2015-12-03 36 views

回答

2

int main()删除;最后。

#include "stdafx.h" 
#include <iostream> 

int main(); // this ';' is giving problem remove it. 
{ 
    std::cout << "Hello World"; // use std::cout 
    return 0; 
} 
+1

下一个错误:它被称为'std :: cout'。 – juanchopanza

+0

@juanchopanza,对,但在某些编译器中,它也可以与它一起运行。谢谢,我也会将其添加到答案中。 – Himanshu

+0

一个不符合标准的人可能? – juanchopanza