0
What's wrong with this?
#include <iostream> using namespace std; int main() { cout << "This " << "is " << "awesome!"; return 0; patch() fer<< "is " << "good "; return 1; }
2 Respostas
+ 2
Hello Perroquet Charles,
In your code I see the folowing things: - the first one is that patch() has a missing prototype before main, assuming that you have void patch(){//code} after main; - second thing is that you are missing ; when calling patch(); - the third one is that instead of "fer" you would have to use cout to print. The return 0; as in no error occured should be at the end of main function. Naturally, a different number than 0 means that main() existed with an error. If you want to use those two returns, try to use a condition (if(){} else for example) to separate them, otherwise your function will exit with 0 after the first cout and the rest of the code will be ignored. Hope this helps you. Have a nice day. Ovidiu-Gabriel.
0
thanks Stan