C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 8th, 2005, 09:47 AM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
No symbolic information found.

Hi

I'm going to be studying C++ next year, so I thought I'd get a bit of a head start. I've only just started, and I am suddenly getting this error:

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


All I'm doing is running a simple "Hello World" program...it worked perfectly fine yesterday when I wrote it, I opened it today and executed it and got this message....utterly confused now.

The code:

// my first program in C++

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!" << endl;
return 0;
}


I'm running this in Microsoft Visual C++ v6.0 on Windows XP

Reply With Quote
  #2  
Old July 8th, 2005, 01:33 PM
drayel drayel is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 21 drayel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 59 m
Reputation Power: 0
Are you running it from the compiler or from the exe file?

Reply With Quote
  #3  
Old July 8th, 2005, 03:06 PM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
from the compiler.

If I run it from the exe the console just flashes up for a fraction of a second then disapears

Reply With Quote
  #4  
Old July 8th, 2005, 03:37 PM
drayel drayel is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 21 drayel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 59 m
Reputation Power: 0
Well, the problem is not with your code. Of that much, I am sure. This could be a problem with your compiler or the commands you are using. Try opening a new project, adding a new cpp file, and then writing it again.

Reply With Quote
  #5  
Old July 8th, 2005, 06:41 PM
nishivision nishivision is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 nishivision User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 58 sec
Reputation Power: 0
write
#include<iostream.h>

Reply With Quote
  #6  
Old July 9th, 2005, 08:45 AM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
tried re-writing it, both with <iostream> and <iostream.h> ... still gets the same error...and this happens with anything I try to run, I've tried running friends programs on it as well

Reply With Quote
  #7  
Old July 10th, 2005, 02:24 AM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
Didn't you say the screen just flickered up for a second when you ran the EXE manually, or do you still get that error?
__________________
Officially a member of the Itsacon fan club. Beer blasts are every friday at Viper_SB's house. I bring the chips.



Reply With Quote
  #8  
Old July 10th, 2005, 09:15 AM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
Yes, when I run it through the complier or the exe file, the console flashes up for a second. I'm assuming it runs the code in that time.

Reply With Quote
  #9  
Old July 10th, 2005, 02:23 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
Yes, it does. Once all code has finished executing, the console will close. To keep it open, place a "cin.get()" line at the bottom (before "return"), this will pause the program until <Enter> is stuck....

Reply With Quote
  #10  
Old July 11th, 2005, 01:14 PM
drayel drayel is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 21 drayel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 59 m
Reputation Power: 0
Quote:
Originally Posted by B-Con
Yes, it does. Once all code has finished executing, the console will close. To keep it open, place a "cin.get()" line at the bottom (before "return"), this will pause the program until <Enter> is stuck....


*slaps head*
Oh man, why didn't I notice that!? Good job, B-Con.

Reply With Quote
  #11  
Old July 11th, 2005, 03:20 PM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
nice one! Thanks...although I still get the error message after I hit return

Reply With Quote
  #12  
Old July 12th, 2005, 12:34 AM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
Geo

Hey man I'm a begginer as well, and It sounds like we are in the same boat. You might have already figured this out by now but if you want the program to stay on the screen until you put some type of input in, then you cant have it "return 0;" because then it will return nothing. But if you declare some type of variable for the user to input then it wont close until the user does so.

#include <iostream>
using namespace std;

int main (void)
{
int choice;// choice can be whatever you want
//Im sure you know what int means.
cout << "Hello World! \n";// \n takes the place of <<endl
cin>>choice;//this will make it stay on screen until you enter something.
}
I use Visual Studio 2005 Beta edition and this works for me, and I am also reading C++ Programming by Dirk Henkenmans and Mark Lee very good book!!-- Hope This helps --


LOL-- I skiped over some replies -- Question already answered-- =Þ

Last edited by Geo.Garnett : July 12th, 2005 at 01:49 AM. Reason: DUHHHhhh

Reply With Quote
  #13  
Old July 12th, 2005, 09:22 AM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
yeah, but the odd thing is that the code worked when I first ran it...the problem only occured the next day

Reply With Quote
  #14  
Old July 12th, 2005, 10:34 AM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
HMmmmm

That's strange, I'm not sure what went on but like I said I'm in the same boat as you sounds like. I don't start my main classes for almost a year and I'm reading through that book I showed you ^ on the last post. I started the same way about three months ago, with hello world program now I have read the book but I am only on chapter 5 on actual understanding of the language. What I have learned is that when I first started I would get errors all the time, every kind, mostly because I would put a period, semicolon, so on, were there was not suppose to be one or something simple like that, and that was my error problem. so all I would suggest is to write it over then re-write it, until you understand the concept of that excercise you are doing. That's what I did for every excercise my Visual Studio project folder is filled to the brim with little programs like that one and even ones of my own creation in order to practice.
I hope this helps !!!

Good Luck !!!

Reply With Quote
  #15  
Old July 12th, 2005, 04:14 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
Quote:
Originally Posted by Empath
yeah, but the odd thing is that the code worked when I first ran it...the problem only occured the next day
Just to clarify, you're still having problems with the "Loaded 'ntdll.dll', no matching symbolic information found." error?

If so, you'll need to isolate the problem. Try using a different compiler, so we can confirm that it is (not) the problem. I'd recommend Dev-Cpp, it should be quick to set up and easy enough to use....

Reply With Quote
  #16  
Old July 13th, 2005, 09:36 AM
Empath Empath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 12 Empath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 9 sec
Reputation Power: 0
I still get the error on Visual C++, but it seems fine on Dev-Cpp...but still flashes up for a second if I don't put in the "cin.get()"

Reply With Quote
  #17  
Old July 13th, 2005, 08:00 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
Quote:
Originally Posted by Empath
I still get the error on Visual C++, but it seems fine on Dev-Cpp...but still flashes up for a second if I don't put in the "cin.get()"
Yeah, that's normal for it to flicker without the cin.get(). If it doesn't just flicker without that or some other type of input if compiled by a different compiler, than that compiler is throwing in extra code to do that for you.

I'm unfamiliar with VC++, so I don't know what exactily to look for, but apparantly its doing something funky during the builds. Unless you need to use VC++ for a specific project or something, I would recommend that Dev-Cpp compiler highly for home use....

Reply With Quote
  #18  
Old July 14th, 2005, 08:26 AM
Empath Empath is offline
Registered User