Skip to content

Instantly share code, notes, and snippets.

@dddiaz
Created November 12, 2014 01:21
Show Gist options
  • Save dddiaz/cb3fa307ad117d05df5b to your computer and use it in GitHub Desktop.
Save dddiaz/cb3fa307ad117d05df5b to your computer and use it in GitHub Desktop.
Constructor error
//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