I have a problem. Here is the simplified version:
#include <iostream>
using namespace std;
int main() {
cout << "Hello!";
return 0;
}
string name = "My name is ______";
int main2() {
cout << name;
return 0;
}
I have tried to remove the first return 0; in the main(), but it did nothing. I want to somehow start main2() from main(). Is it possible? I tried running the code(I use repl.it) and it didn't return any error messages. I also tried running it from the Terminal and it just prints Hello!.