简体   繁体   中英

How do you run a C++ code in Windows Visual Express?

I am just starting to learn the C++ language and I have recently come across a problem. The book that I bought told me how to compile a program but it didn't tell me how to run it. When I try to run it using the debugger, this is what comes up:

'Hello.exe' (Win32): Loaded 'C:\\Windows\\SysWOW64\\KernelBase.dll'. Cannot find or open the PDB file. 'Hello.exe' (Win32): Loaded 'C:\\ProgramData\\Norton{0C55C096-0F1D-4F28-AAA2-85EF591126E7}\\N360_20.3.0.36\\Definitions\\BASHDefs\\20131022.001\\UMEngx86.dll'. Cannot find or open the PDB file. 'Hello.exe' (Win32): Loaded 'C:\\Windows\\SysWOW64\\msvcp120d.dll'. Cannot find or open the PDB file. 'Hello.exe' (Win32): Loaded 'C:\\Windows\\SysWOW64\\msvcr120d.dll'. Cannot find or open the PDB file. The thread 0x1748 has exited with code 0 (0x0). The program '[648] Hello.exe' has exited with code 0 (0x0). ter code here`

Can somebody please tell me what I am doing wrong? By the way this is what comes up at the bottom of the page where output should be.

Try using a pause fragment before the end of main() .

std::cout << "Paused.  Press ENTER to continue.\n";
std::cin.ignore(100000, '\n');

or placing a breakpoint at the end of main() .

I suggest using "Rebuild all" option to make the PDB warnings go away. Another solution is to manually open the folder and delete them then rebuild.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM