me@me:~/code$ g++ linked.cpp -o linked.out
linked.cpp: In function ‘int main()’:
linked.cpp:37: error: expected primary-expression before ‘head_node’
linked.cpp: In function ‘void READIN(Node*, std::string)’:
linked.cpp:53: error: ‘in’ was not declared in this scope
linked.cpp:54: error: invalid array assignment
linked.cpp: At global scope:
linked.cpp:100: error: expected unqualified-id before ‘{’ token
I'll help you a little since you at least took the time to use tags properly. As you can see the function returns a Node object but in your main you are trying to assign an object to a pointer.
Thanks. I went through my code and fixed tons of errors. Now, I only have one error left. I couldn't find anything useful on google.
me@me:~/code$ g++ linked.cpp -o linked.out
linked.cpp: In function ‘Node* READIN(Node*, std::string)’:
linked.cpp:54: error: ‘in’ was not declared in this scope
The error is totally self-explanatory. Look in the scope of READIN: where are you declaring "in"?
Also, just for future reference, anything in capital letters usually represents a preprocessor macro, not a function. People reading your code could be confused, so it's better to just use lower-case letters in function names.
Thanks, I was looking at an example while doing this. I thought in.getline was a function of getline. Also, I'll remember not to use caps for my function names. Now, I need to figure out why it's maxing out my cpu lol