Mac OSX, I’m trying to use tchar.h, but apparently that’s Windows specific. And I’m guessing it is the reason this code is not working for me:
//toString
char *Node::toString(){
char hilera[100];
strcpy(hilera, dato->toString());
strcat(hilera, "\n");
return hilera;
}
So, what do you suggest?
After exit from function-scope
hilerawill be destroyed, dangling pointer will be returned. Usestd::string, or allocate memory in heap.