I am using DEV-C++ 5.11 on Windows 10. I find that the Debugger support for STL containers seems not very good, or maybe I am missing something. I have following code: xxx.h
typedef std::vector<double> vd;
typedef vd::const_iterator it_vd;
xxx.cpp
vd vec;
......
for (it_vd it = vec.begin(); it != vec.end(); ++ it)
{
std::cout << "element " << *it << std::endl;
}
First, I found that I cannot see the content of vec by using the watch. Second, if I put the breakpoint at the line in the for loop, once the debugger goes there, it cannot get out, no matter I use next line/next instruction or continue. Am I missing something?
使用“\\n”(换行)而不是 endl。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.