Public Group

# Error in Compile

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

## 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 on other sites
What are the error messages?

##### 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 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:
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 on other sites
I don't think you need a .h after iostream.

Perhaps it's an error in texture.cpp?

##### Share on other sites
Quote:
 Original post by SanctuxI 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.

1. 1
Rutin
36
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 98
• 11
• ### Forum Statistics

• Total Topics
632974
• Total Posts
3009654
• ### Who's Online (See full list)

There are no registered users currently online

×