编译出现这个问题
#include "stdafx.h"
#include "iostream"
using namespace std;
int main( )
{
cout<<34<<endl;
return 0;
}
添加一行代码:
using namespace std;
编译
本文介绍了一个简单的C++程序,在编译过程中遇到的问题及解决方案。通过添加using namespace std;语句解决了cout未定义的错误。
编译出现这个问题
#include "stdafx.h"
#include "iostream"
using namespace std;
int main( )
{
cout<<34<<endl;
return 0;
}
using namespace std;
编译

被折叠的 条评论
为什么被折叠?