+ 1

#include <iostream> using namespace std; void printSomething(int x) { cout << x; } int main() { printSomething(42); }

14th Apr 2018, 12:20 PM
TOKOLLO COLLEN
TOKOLLO COLLEN - avatar
4 Antworten
+ 5
Ariela There are no problems omitting the return statement for the main function.
14th Apr 2018, 2:24 PM
Hatsy Rei
Hatsy Rei - avatar
+ 3
Whats the question? And you have to add return 0; at the end of your main() method
14th Apr 2018, 12:29 PM
Ariela
Ariela - avatar
+ 2
ok
14th Apr 2018, 12:31 PM
TOKOLLO COLLEN
TOKOLLO COLLEN - avatar
+ 2
the IDE adds it I think. invariably, it is needed to terminate the begin prompt.
14th Apr 2018, 10:14 PM
Emperor Anthony
Emperor Anthony - avatar