If that is what I should use, then what is wrong with my code.
It doesn't compile. I thought I could use a structure for a list.
I get the following error when trying to compile.
// linked list
using namespace std;
const int SIZE=81;
error C2974: 'std::list' : invalid template argument for '_Ty', type expected
It errors on both list declarations. Is there an error in my syntax?
I just fixed the constructor and it removed the errors.
I eliminated the Data decloration and replaced it with the struct name link.
(1) Is this a valid list decloration?
(2) If not what is wrong with it? It compiles, but I haven't been able to write the remainder of the program yet to test it.
(3) Does this instantiate two identical empty lists called Data1 and Data2?
Why doesn't this work to assign details to the list?
I even tried to replace the field in red with this below and it still doesn't work. What is wrong with it?
I have also tried this below and it also does not link.
error C2228: left of '.push_front' must have class/struct/union type
error C2039: 'Node' : is not a member of 'std::list<_Ty,_Ax>'
These errors have completely lost me.
What do they mean?
Think I should have started a new thread for these questions?