+ 2
Help! Total beginner here! What is the error in this code?
4 Réponses
+ 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