cant find iostream

Hello,
So today I needed to write a new code... I opened a new project, console application. It opened up something like this so i compiled and ran it, just to be sure.
1
2
3
4
5
6
#include <iostream>
int main()
{
    std::cout << "Hello world!" << std::endl;
    return 0;
}

Once it compiled and ran, I added a class to the project called Card. The card class is not set up at all... It's just the default settings that opens with code::blocks.
1
2
3
4
5
6
7
#include "Card.h" 
#include <iostream>
int main()
{
    std::cout << "Hello world!" << std::endl;
    return 0;
}

Now when i compile this, i get an error stating that it cannot find iostream. If i delete the #include "Card.h" it still gives me the error... I am completely lost.
Last edited on
If I comment out line 1 of your second snippet, it compiles fine for me.
It will not for me... it keeps giving me the error that it cannot find the iostream...
The code now looks like the first one given, no include "card.h" or anything, and i am getting IOSTREAM cannot be found.

It happens every time i add a class to a project...
Last edited on
Topic archived. No new replies allowed.