compiler says:Code:59: string::iterator it = line.begin(); 60: int j = 0; 61: for ( ; it < line.end(); it++) 62: for ( ; j < width_; j++ ) 63: maze_[i][j] = *it;
61: error: ‘it’ was not declared in this scope
I say:
"WTF?"
This is a discussion on iterator string within the C++ Programming forums, part of the General Programming Boards category; Code: 59: string::iterator it = line.begin(); 60: int j = 0; 61: for ( ; it < line.end(); it++) 62: ...
compiler says:Code:59: string::iterator it = line.begin(); 60: int j = 0; 61: for ( ; it < line.end(); it++) 62: for ( ; j < width_; j++ ) 63: maze_[i][j] = *it;
61: error: ‘it’ was not declared in this scope
I say:
"WTF?"
Provide the smallest possible compilable code that demonstrates the problem?
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
From those lines of codes pretty much the only cause i can find for that error is that you forgot to use the std namespace (ie. need to use std::string::iterator).