| | |
Is this a runtime error?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
I wrote a simple program to print out Testscore in Visual Studio .Net 2003
and got the following messages when trying to run it.
'TestScore.exe': Loaded 'D:\Documents and Settings\pooleb\My Documents\Visual Studio Projects\TestScore\Debug\TestScore.exe', Symbols loaded.
'TestScore.exe': Loaded 'D:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'TestScore.exe': Loaded 'D:\WINDOWS\system32\kernel32.dll', No symbols loaded.
The program '[3920] TestScore.exe: Native' has exited with code 0 (0x0).
This is the program:
<< moderator edit: added [code][/code] tags >>
It is from an example in C++ Demystified by Jeff Kent.
Am I doing something wrong?
Thanks, BandM
and got the following messages when trying to run it.
'TestScore.exe': Loaded 'D:\Documents and Settings\pooleb\My Documents\Visual Studio Projects\TestScore\Debug\TestScore.exe', Symbols loaded.
'TestScore.exe': Loaded 'D:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'TestScore.exe': Loaded 'D:\WINDOWS\system32\kernel32.dll', No symbols loaded.
The program '[3920] TestScore.exe: Native' has exited with code 0 (0x0).
This is the program:
C++ Syntax (Toggle Plain Text)
#include <iostream> using namespace std; int main(void) { short testScore; testScore = 3; cout << "Your test score is " << testScore << "\n"; return 0; }
It is from an example in C++ Demystified by Jeff Kent.
Am I doing something wrong?
Thanks, BandM
>Am I doing something wrong?
Nope. Your program opens a command shell, executes sucessfully, and having nothing further to do the command shell is closed. Happens in the blink of an eye.
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
Nope. Your program opens a command shell, executes sucessfully, and having nothing further to do the command shell is closed. Happens in the blink of an eye.
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
If you want to see the result, you could do the following :
add before the first line of your program
add before the end of your main() function.
add
C++ Syntax (Toggle Plain Text)
#include <stdlib.h>
add
C++ Syntax (Toggle Plain Text)
system("pause");
•
•
Join Date: Nov 2004
Posts: 108
Reputation:
Solved Threads: 3
Or you could be smart and not use a system command.
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
Join me on IRC:
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
•
•
Join Date: Nov 2004
Posts: 108
Reputation:
Solved Threads: 3
I think VS 6.0 automatically places a pause after your program has executed.
Join me on IRC:
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
![]() |
Similar Threads
- Runtime Error -21470024770 (8007007e) (Windows NT / 2000 / XP)
- Runtime Error 226 (Windows 95 / 98 / Me)
- runtime error#58 (Visual Basic 4 / 5 / 6)
- "The Sims" visual C++ runtime error, what shall i do? (Windows Software)
- Visual Runtime Error, Sound Problem, Disabled Norton and more! (Windows NT / 2000 / XP)
- Runtime Error 424 object required (was: Please Help!) (Visual Basic 4 / 5 / 6)
- Runtime error using Incredimail on XP (Windows NT / 2000 / XP)
- Runtime error ??!! (Windows 95 / 98 / Me)
Other Threads in the C++ Forum
- Previous Thread: copy constructor problem
- Next Thread: Serial Port
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






