//Game Over
// My first program
#include <iostream>
int main()
{
std::cout << "Game Over!" << std::endl
return 0;
}
Error:
1 2 3 4 5 6 7
'game_over.exe': Loaded 'C:\Users\Sean\Desktop\C++ Proj\game_over\Debug\game_over.exe', Symbols loaded.
'game_over.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'game_over.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'game_over.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'game_over.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'game_over.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[9184] game_over.exe: Native' has exited with code 0 (0x0).
Error: expected a ';'
(This is whenever hovering over the return under std::cout)
You are missing a ; after your std::endl on line 8.
Also, it is exiting immediately because it has hit the return 0 in main, which causes you program to end and the window to close. You can either run it through cmd.exe or put another statement there like std::cin.get(); //waits for any key and a enter to make the program wait for something before it closes.