RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
Captain Vimes
Grumble Teddy


Joined: 12 May 2006
Posts: 225
Location: The City Streets

PostPosted: Tue Nov 27, 2007 6:37 pm    Post subject: Another Problem [quote]

When I'm working on my Space Invaders program as SDL practice, I keep running into a problem. My engine uses vectors to keep track of the sprites and tiles to display, but it says that _M_start and all this stuff in the vector file is undeclared.

Now, I thought I'd fixed that by adding #include <stdlib>. And I did. It worked when I clicked compile and run. But then I clicked c&r again and it said

<stdlib>: no such file or directory

followed by all these vector errors from before!
I changed nothing. Any ideas what's happening here?
_________________
"Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Tue Nov 27, 2007 8:27 pm    Post subject: [quote]

.h

Also, no code never helps.
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Tue Nov 27, 2007 11:49 pm    Post subject: [quote]

std::vector is defined in <vector> (as in #include <vector>). The C stdlib is in <cstdlib> in C++ (as in #include <cstdlib>). The same patterns applies to all standard C headers, e.g. <stdio> becomes <cstdio> in C++.
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum