ok thanks for the advice - i was meant to post up my linked list but i used vectors to do it so i guess that way would work. cheers
ok thanks for the advice - i was meant to post up my linked list but i used vectors to do it so i guess that way would work. cheers
hey there i tried the code that was posted above for the array of linked lists but i keep gettin compilation errors from it. the error message says forbids declaration of no type and expected ; before < token. any idea's??
Add "std::" in front of "vector" and next time, please, post the exact error message.
Ok i tried that too but it still doesnt work.im creating the vector in my header file underneath private: is that right? heres my new error message:
Could you post the code?
Qt Code:
private: std::vector<int> array[] = { vector<int> a, vector<int> b };To copy to clipboard, switch view to plain text mode
You can't initialize member variables like this.
Try:Qt Code:
typedef std::vector<int> Vector; class Test { // ... private: static const int SIZE = 2; Vector array[ SIZE ]; };To copy to clipboard, switch view to plain text mode
therealjag (9th March 2006)
Bookmarks