+ 2
Help! Total beginner here! What is the error in this code?
6 Answers
+ 5
Unfortunately, you can't overload main method in c++. So you can't have the 2nd part of the code.
If your objective is to print hello world twice, use a loop.
(In case you didn't know, function overloading is, creating 2 or more function with the same name but different arguments)
+ 5
Got it thank you all!
+ 4
Your problem is that you double-ran the function c ++ Here I have corrected your code! :) āāā
#include <iostream>
using namespace std;
int main () { Ā Ā Ā
Ā cout << "Hello world!"; Ā Ā Ā
Ā return 0;
}
0