+ 2
To end the cout do i need to have return 0; and {}
5 Réponses
+ 5
If you are using int main() or other main functions at the end of the program you must use return 0; I prefer void main () it doesn't need return 0. To the end of the cout need not use return 0 but use ;'s
+ 3
in c++ every statement should end with a semicolon cout is just an predefined output function which is a part of the statement
+ 3
To end cout you need to use semi-colan, "}" is for the whole function.
0
to end cout, you need semi-colon ( ; )
return 0 and {} are for the entire program
eg cout << "Hi" ;
0
thank you