Reputation: 21
So.. I am noob, and I just created a c++ empty project in Visual Studio 2017.
int main() {
return 0;
}
This is all I have in 'main.cpp', and 'main.cpp' is the only thing I've added/done in this project.
I started without debugging and it results :
E:"location_of_the_file" (process 1276) exited with code 0.
Press any key to close this window . . .
I have no idea how to remove that first line. Please help!
Upvotes: 1
Views: 4927
Reputation: 27
I did not like this long text either. Instead of return 0; in the main function. I suggest that you replace it with system("pause>0");
This way, you will only see the output :)
Upvotes: 0
Reputation: 1120
This line should be visible only when you run the application in Visual Studio.
There is no reason to disable this line, it only allows you to see return result when debugging. When you run the application outside of Visual Studio, this line will not display.
I see this:
MyApp.exe (process 9076) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
There you can see how to disable this when you need to disable it.
Upvotes: 0