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