+ 2

Help! Total beginner here! What is the error in this code?

https://code.sololearn.com/cY3bbuzMU4uP/?ref=app

20th Dec 2017, 1:46 AM
Veronica Dorn
Veronica Dorn - avatar
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)
20th Dec 2017, 1:51 AM
DAB
DAB - avatar
+ 5
Got it thank you all!
20th Dec 2017, 1:54 AM
Veronica Dorn
Veronica Dorn - avatar
+ 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; }
20th Dec 2017, 1:50 AM
James16
James16 - avatar
20th Dec 2017, 1:56 AM
Rian Pratama
Rian Pratama - avatar