使用gcc编译时候,编译选项如下:
g++ -std=c++11 -g -o cpp730 cpp730.cpp
程序可以正常运行,但是使用gdb.exe调试的时候,遇到endl,就无法继续调试,每次都卡在这个语句.
用来试验的代码比较简单
#include
#include
#include
using namespace std;
int main(){
string temp("abcdefg");
cout << temp << endl;
for (auto &a : temp)
a = toupper(a);
cout << temp << endl;
return 0;
}
g++和gdb都是最新的版本,然后gdb用来调试C语言程序没有出现问题.
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证高级PHP讲师