0

I am a beginner of c++
I just built a very simple Hello World program
but nothing output to the screen
what's the problem?

Thanks in advance.

Here is output message:

'HelloWorld.exe': Loaded 'D:\Visual Studio 2005\Projects\HelloWorld\debug\HelloWorld.exe', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'HelloWorld.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'HelloWorld.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
The thread 'Win32 Thread' (0x414) has exited with code 0 (0x0).
The program '[3852] HelloWorld.exe: Native' has exited with code 0 (0x0).

3
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by restrictment
0

Adding the code would help.

Anyway, just try putting in, system("cls") at the bottom of your code, then run it.

0

Select Win32 console project if you did not already. If you haven't create a new project for Win32 Console. Leave empty project unchecked and uncheck precompiled headers. See if any or all of that helps :) (Also make sure it built correctly with no errors, though it sounds like you were saying it did. It should say 1 succeeded 0 failed yada yada in the output window.

Edited by jonsca: n/a

0

Thanks! The code is work, but flashed out quickly.
How to pause that screen until i press a button?

0

Thanks! The code is work, but flashed out quickly.
How to pause that screen until i press a button?

Adding the code would help.

Anyway, just try putting in, system("cls"); at the bottom of your code, then run it.

Please try to read the first post. :yawn:

Also, if you are trying to make your program portable, (which I doubt in such an early stage of coding), use the getch(); command.

Edited by restrictment: n/a

0

Put in a cin.get() at the end of your code (before return 0; )

Edited by jonsca: n/a

0

Anyway, just try putting in, system("cls") at the bottom of your code, then run it.

No, not system("cls")
a) system() shouldn't be used and b) if anything would be system("pause") but don't use that either.

Read http://www.gidnetwork.com/b-61.html if you have doubts about that.

Or you can run your program .exe directly from the console and you won't have to worry about pausing. Change to yourprojdir\Debug

Edited by jonsca: n/a

0

No, not system("cls")
a) system() shouldn't be used and b) if anything would be system("pause") but don't use that either.

Read http://www.gidnetwork.com/b-61.html if you have doubts about that.

Or you can run your program .exe directly from the console and you won't have to worry about pausing. Change to yourprojdir\Debug

Ah yes, it's pause..I knew this, but apparently was not thinking when I posted. Anyway, I use this because I have no plans on making the code portable, and this was how our teacher taught us.

Yet getting into the habit of not using system() commands is a good idea if you do have plans for future portable codes..I suppose I should start converting for efficiency sake.

Edit: I really wish that the edit button wouldn't vanish after 30 minutes, because I would have really liked to correct my mistake.. =/

Edited by restrictment: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.