Sign in to follow this  

Error in Compile

This topic is 3668 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
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

This topic is 3668 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this