1.添加 using namespace std;
如果还是不行的话;试着改成下面的样式:
int main()
{
return 0;
}
有些编译器main必须返回int类型
那个.h不用加,在头文件下加using namespace std;,然后devc++main函数是要返回0的,
1
2 std::count
3 std::endl
再错就找开发环境问题
#include <iostream>
using namespace std;
void main()
{
cout << "hello" << endl;
cout << "It is a sample c++ programm" << endl;
}