0
why when I write: #include <iostream> using namespace std; int main() { cout <<"Hello world!"; return 0 } int main() { ----It says ERROR
21 odpowiedzi
+ 4
remove the-
int main ()
{
and add ; after return 0 i.e return 0;
+ 3
2 reasons...
1st we can't use two main function in a single program
2nd concept of function overloading...
+ 2
semi colon missing there
+ 2
u need ; (semicolon). return 0;
+ 2
add ; after the return 0 and remove the second main
+ 1
because you wrote two variable with the same name, "int main" and because you forgot to close the 2nd variable with a }
and a ; is missing After return 0
+ 1
i think after return 0 it has semicolon.. and delete second int main()
+ 1
you forgot a semi Colon after return;and you can not write the second int main function. .
+ 1
you should erased last two lines
+ 1
you forgot semicolon after 'return 0' and also made a mistake using 2 'int main' after finishing.
+ 1
use semicolon after return 0;
+ 1
you have not used semicolon for return statement
0
must error
0
use ; after 0
0
add semi colon after the return 0 and clear all other codes after that
0
obviously it'll say errors,u can't use main function like this .
0
whats with the second int main???
0
Delete int main which is behind and { then run the program
0
semicolon is missing;
0
yoyi