解决VScode中使用cout报错

时间:2025-04-27 08:23:29

解决VScode中使用cout报错

    • BUG描述
    • 尝试的解决方法:

BUG描述

更改了c++的开发工具,从 codeblocks 换到 VS code :

运行 :

#include
using namespace std;


cout << " ******* " << endl ;
报错

尝试的解决方法:

更改 cout 格式 :

std::cout<<****<<std::endl;

提前进行cout,cin等格式的声明:


using namespace std;
using std ::cout;
using std ::cin;
using std ::endl;