Skip to content

Instantly share code, notes, and snippets.

View dddiaz's full-sized avatar
🏠
Working from home

Daniel Diaz dddiaz

🏠
Working from home
View GitHub Profile
@dddiaz
dddiaz / gist:cb3fa307ad117d05df5b
Created November 12, 2014 01:21
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;
}
}
//Im tring to implement a string with a linked list
using namespace std;
class String
{
public:
/// Both constructors should construct
/// from the parameter s
String( const char * s = "");
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.