I tried using strcpy() and I got a type mismatch. I tried assigning a like how I did it in my previous code (which was an int type), but I got a lvalue error. I'm guessing you can't assign the data just like that to a data node?
On line 6, char a is a single character, not a pointer to the first character in an array of characters.
If you're using C++ instead of C, you should use std::string instead - then you can just use the = operator to do that (and it handles many other string things for you, along with dynamic resizing handled for you). The syntax you use on line 3 though suggests you're doing this in C, though.
On line 6, char a is a single character, not a pointer to the first character in an array of characters.
Sorry, can I get a hint on how to do this in C? I saw some samples like:
scanf("%s", &newNode->ACNM);
But unfortunately, I can't go that way. I already have my data ready from a file, and I just need to cache the data into memory like what I have coded up there.
EDIT: I re-read your reply and got my hint (of sorts?)