Jump to content
  • Advertisement
Sign in to follow this  
coolkat677

Error in Compile

This topic is 3885 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok,this is a really weird problem and getting quite frustrating. I have this simple line of code that makes the whole thing not compile.
#include <iostream.h>
using namespace std;
and the error says that the declaration for the "using namespace std;" was wrong. The thing is it didn't used to have this error...

Share this post


Link to post
Share on other sites
Advertisement
depending on the compiler, u may not need 'using namespace std;', or u may need to change <iostream.h> to just <iostream>. i had a problem with it once, so just mess with it a little and the problem should seem obvious. if u're using VC++ 6.0 or something similar, the code may have to be done like this:


#include <iostream>

using namespace std;



if this didn't help, then i've no idea, i'm still kinda new at it too

Share this post


Link to post
Share on other sites

EDIT: Well I figured out that I forgot a semi-colon... But I still got a fatal error.

C:\Users\Sam\Documents\Visual Studio 2005\Projects\SpaceGame\SpaceGame>bcc32 mai
n.cpp texture.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
main.cpp:
texture.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Error detected (LME1508)
Fatal: Error detected (LME1508)
Fatal: Error detected (LME1508)
Fatal: Error detected (LME1508)


[Edited by - coolkat677 on December 1, 2007 5:41:20 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Sanctux
I don't think you need a .h after iostream.

Correction: You should not have a .h after iostream.

The header is iostream, not iostream.h.

The .h version is deprecated. Among other things, I believe iostream.h does not use the namespace std.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!