How do I get this to work?
I have a Vector<string> maze; which is passed on to this function:
Code:void load( Vector<string> maze) { height_ = maze.size(); if(height_ == 0) return; width_ = maze.get(0).length(); if( width_ == 0 ) return; maze_= new int[height_][width_]; for(int i=0; i < height_; i++) { for( int j=0 ; j < width_ ; j++ ) { maze_[i][j] = maze.get(i).charAt(j) - '0'; } } }
but my compiler says:
maze.cpp:287: error: variable or field ‘load’ declared void
maze.cpp:287: error: ‘Vector’ was not declared in this scope
maze.cpp:287: error: expected primary-expression before ‘>’ token
maze.cpp:287: error: ‘maze’ was not declared in this scope



LinkBack URL
About LinkBacks


