Front Office Football Central  

Go Back   Front Office Football Central > Archives > FOFC Archive
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 04-29-2004, 04:54 PM   #1
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Visual Studio Problem

Hey guys -

I am having troubling compiling a program in Visual C++. I am having to do it for a class and I am getting the following error when I try to run the program. The screen flickers then kicks back to this...

Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
The thread 0x9E8 has exited with code 0 (0x0).
The program 'C:\Program Files\Microsoft Visual Studio\MyProjects\Learning\Debug\Learning.exe' has exited with code 0 (0x0)

I am doing it in a Win32 console enviorment. The complier was issued you to me under the liscense of the school. Anyone know what could be wrong?

GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 05:22 PM   #2
Taco
High School JV
 
Join Date: Jan 2002
Location: New Zealand
It's been awhile since I've used Visual Studio, but isn't code 0 = success? Is it possible that your program is running successfully, but since it is a console app it just runs and completes and then sends you back to the debugger? Does the program wait for any sort of user input? What happens when you run it outside of Visual Studio from the command line?
Taco is offline   Reply With Quote
Old 04-29-2004, 05:23 PM   #3
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Taco sounds correct. You say it flickers. That's probably the console window opening and closing.

EDIT: Just throw a little bit of code to get input from the user somewhere in the code just to see if it is actually running.

Last edited by sabotai : 04-29-2004 at 05:25 PM.
sabotai is offline   Reply With Quote
Old 04-29-2004, 05:30 PM   #4
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
The code does not ask for user input...

How can I get it to where it stays up?

PS I hate the console.
GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 06:11 PM   #5
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Actually, on second thought, why not just create a text file and output lines to it. Like everytime the code does something, you output "Attempting to..." before that section of code and than "Success" after it (or say what went wrong if it didn't work).

I had to learn several times to make this a habit. Welcome to the real world of computer programming.
sabotai is offline   Reply With Quote
Old 04-29-2004, 06:15 PM   #6
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
example, everytime I add a fighter to the database for my boxing dynasty, I see this in my browser

Attempting to add fighter...
Connected
DB selected
Variables copied over
slashes added and integers made
query made
INSERT INTO tblFighters VALUES (NULL, 'John', 'Ferguson', 'Sandy', 0, 0, 0, 0, 0, 0, '1898', 'np.jpg', 1898, 1916, 0.0)
query sent
1 fighters added.


Where "1 fighters added" (shut up grammer cops, this is code. ), if something goes wrong with the query attempt, it'll post it there.
sabotai is offline   Reply With Quote
Old 04-29-2004, 06:41 PM   #7
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by sabotai
Actually, on second thought, why not just create a text file and output lines to it. Like everytime the code does something, you output "Attempting to..." before that section of code and than "Success" after it (or say what went wrong if it didn't work).

I had to learn several times to make this a habit. Welcome to the real world of computer programming.

How would I exaclty do this? You misspelled grammar...
GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 07:34 PM   #8
Taco
High School JV
 
Join Date: Jan 2002
Location: New Zealand
Like I said, it's been awhile since I have done Visual Studio (and C++), but I believe if you put Readln(); as the last line of your program that it will keep the console window open until you hit enter.
Taco is offline   Reply With Quote
Old 04-29-2004, 08:13 PM   #9
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by Taco
Like I said, it's been awhile since I have done Visual Studio (and C++), but I believe if you put Readln(); as the last line of your program that it will keep the console window open until you hit enter.

That didn't work.

Here is the code:
#include

int main()
{
int x = 5;
int y = 7;
cout << "\n";
cout << x + y << " " << x * y;
cout << "\n";
return 0;
}
Readln();
GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 08:14 PM   #10
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
No, put the Readln(); before the return 0;

The return 0; line is what closes the program.
sabotai is offline   Reply With Quote
Old 04-29-2004, 08:18 PM   #11
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by sabotai
No, put the Readln(); before the return 0;

The return 0; line is what closes the program.

That gives an undeclared idenitifier error.
GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 08:20 PM   #12
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Here's how it would be done using the text file output:

Code:
int main() { ostream outfile('Output.txt'); outfile << "Beginning program\n"; int x = 5; int y = 7; outfile << "Integers x and y declared. x set to 5, y set to 7\n"; cout << "\n"; cout << x + y << " " << x * y; cout << "\n"; outfile << "The sum of x and y is outputed to the screen\n"; outfile << "The program closes\n"; return 0; }

Then check the file in the directory where your program is and make sure all of the lines have been outputed. If they have, then your program ran fine.

For the Readln(); I don't know the exact use of the that line anymore...in fact, I think that's PASCAL, not C++.

Last edited by sabotai : 04-29-2004 at 08:21 PM.
sabotai is offline   Reply With Quote
Old 04-29-2004, 08:22 PM   #13
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Instead of Readln(); use getch();

Last edited by sabotai : 04-29-2004 at 08:22 PM.
sabotai is offline   Reply With Quote
Old 04-29-2004, 08:27 PM   #14
Bonegavel
Awaiting Further Instructions...
 
Join Date: Nov 2001
Location: Macungie, PA
when you run a console program (assuming VS 6) it will auto-pause waiting for a key press.
Bonegavel is offline   Reply With Quote
Old 04-29-2004, 09:19 PM   #15
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by Bonegavel
when you run a console program (assuming VS 6) it will auto-pause waiting for a key press.

Nope. The code does not show up either. Just a blank screen flickers.
GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 09:59 PM   #16
Taco
High School JV
 
Join Date: Jan 2002
Location: New Zealand
Pascal, C++, I can't keep them all straight anymore! Isn't it "cin" that I was thinking of... Anyway, I should stop giving advice about this. Good luck GE!
Taco is offline   Reply With Quote
Old 04-29-2004, 10:09 PM   #17
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by Taco
Pascal, C++, I can't keep them all straight anymore! Isn't it "cin" that I was thinking of... Anyway, I should stop giving advice about this. Good luck GE!

I figured it out. I was hitting F5 to excute the program instead of Ctrl F5. I have no idea what F5 does.
GoldenEagle is offline   Reply With Quote
Old 04-29-2004, 10:13 PM   #18
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
F5 runs the program in Debug mode, which now makes a lot more sense for what you originall posted.
sabotai is offline   Reply With Quote
Old 04-30-2004, 07:45 AM   #19
Bonegavel
Awaiting Further Instructions...
 
Join Date: Nov 2001
Location: Macungie, PA
GE,

You have an inlcude statement, but aren't including anything. Isn't there something like:

#include <library.h>

that you must add?

[edit - ah, when you insert greater than and less than brackets in this editor the browser interprets them as html- you have to you ampersand-gt; and lt for that to show up. - what are you including?]

Last edited by Bonegavel : 04-30-2004 at 07:48 AM.
Bonegavel is offline   Reply With Quote
Old 04-30-2004, 07:50 AM   #20
Bonegavel
Awaiting Further Instructions...
 
Join Date: Nov 2001
Location: Macungie, PA
dola, oh, i see you found your solution.

GE, when you run the program in debug mode (sorry, assumed you were doing that) do you get the "press any key to continue" message?
Bonegavel is offline   Reply With Quote
Old 04-30-2004, 11:50 AM   #21
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by Bonegavel
dola, oh, i see you found your solution.

GE, when you run the program in debug mode (sorry, assumed you were doing that) do you get the "press any key to continue" message?

No, I do not.

While we are on the topic of Visual C++, does anyone know how can I turn on line numbers?
GoldenEagle is offline   Reply With Quote
Old 04-30-2004, 01:04 PM   #22
gstelmack
Pro Starter
 
Join Date: Oct 2000
Location: Cary, NC
Quote:
Originally Posted by GoldenEagle
While we are on the topic of Visual C++, does anyone know how can I turn on line numbers?

What? Why? C++ doesn't have line numbers, but there is a status display in the lower-right of Visual C++ that shows the current line.

What version of Visual C++ are you using? That's going to make a difference in some of these UI questions.
__________________
-- Greg
-- Author of various FOF utilities
gstelmack is offline   Reply With Quote
Old 04-30-2004, 11:56 PM   #23
Mr. Wednesday
Pro Starter
 
Join Date: Jul 2003
Location: South Bend, IN
Quote:
Originally Posted by GoldenEagle
Hey guys -

I am having troubling compiling a program in Visual C++. I am having to do it for a class and I am getting the following error when I try to run the program. The screen flickers then kicks back to this...

Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
The thread 0x9E8 has exited with code 0 (0x0).
The program 'C:\Program Files\Microsoft Visual Studio\MyProjects\Learning\Debug\Learning.exe' has exited with code 0 (0x0)

I am doing it in a Win32 console enviorment. The complier was issued you to me under the liscense of the school. Anyone know what could be wrong?
As I think has been addressed, there's absolutely nothing going wrong here. The program executes and completes with a value of 0, which indicates success -- either an explicit 'return 0' statement or one that's implicit by falling off the bottom of main without a return.

F5 will run the program in debug mode, whereas Ctrl-F5 will execute the program outside the debugger. You'll only notice the difference if you have errors (if it's in the debugger, by default it will break on exceptions rather than killing the program) or if you've set breakpoints.
Mr. Wednesday is offline   Reply With Quote
Old 04-30-2004, 11:59 PM   #24
Mr. Wednesday
Pro Starter
 
Join Date: Jul 2003
Location: South Bend, IN
Dola, the way I'd handle convincing the console window to stay open is thusly:

Code:
#include <ostream> // pedantic, I don't think you need it in VC. #include <istream> // pedantic, I don't think you need it in VC. #include <iostream> int main(void) { // ... whatever.... char c; std::cout << "Press enter to continue:"; std::cin >> c; }

Last edited by Mr. Wednesday : 05-01-2004 at 12:01 AM.
Mr. Wednesday is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 10:18 PM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Front Office Football Central Database Error
Database Error Database error
The Front Office Football Central database has encountered a problem.

Please try the following:
The forumsold.operationsports.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.