Created
November 12, 2014 01:21
-
-
Save dddiaz/cb3fa307ad117d05df5b to your computer and use it in GitHub Desktop.
Constructor error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//LIST NODE | |
String::ListNode * String::ListNode::stringToList(char * s){ | |
if (s[0] != '\0'){ | |
ListNode * tempHead = new ListNode(s[0],stringToList(s[1])); | |
return tempHead; | |
} else { | |
return nullptr; | |
} | |
} | |
//STRING | |
String::String( const char * s ){ | |
head = nullptr; | |
head = ListNode::stringToList((char *)s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment