Hi All,
When I compile my code I get the following error message:
I think it's due to the order of things - having to make main() at the top of the cpp file (a requirement for my assignment for "good programming").Code:test3.cpp:23: error: variable 'row row_chars' has initializer but incomplete type
I've put all the prototypes at the top, and above all of them I had to make a prototype of my class as well:
Then main():Code:using namespace std; class row; void load_maze(list<row> &maze_rows, row &row_chars, const string &filein); .. etc.
The last line there is where the error surfaces. When I create a new row object it takes an integer. I tried putting "int number" into the class prototype but that didn't help.Code:int main (int argc, char *argv[]) { string filein; list<row> maze_rows; row row_chars(1);
Any suggestions folks?



LinkBack URL
About LinkBacks


