Code::Blocks Forums

User forums => Help => Topic started by: i3ear on October 09, 2011, 10:39:30 pm

Title: <iostream> not found, already searched the fourm
Post by: i3ear on October 09, 2011, 10:39:30 pm
Hello, I am a C++ noob, but I am pretty sure this isn't my fault.
This is what I am trying to compile
Code
#include <iostream>
using namespace std;

int main() {
cout << "Hello World I am " <<8<< " Today!" << endl;
} ///:~
This is the error I get
Code
F:\Documents and Settings\(herpderp)\Desktop\Untitled1.c:1:20: fatal error: iostream: No such file or directory
I have Ming installed on the top folder of the F: drive, on my main partition, but it just won't fucking work.

I have searched the forums myself, and using the advice I reinstalled codeblockers and ming seperatly, setting the compiler directory to Ming, but to no avail.
Is it my fault is it the fault of the program? I have no idea here. :(
Title: Re: <iostream> not found, already searched the fourm
Post by: oBFusCATed on October 09, 2011, 10:54:33 pm
Maybe you should invest some time in your search-fu.

Because you've not found our FAQ and especially this item: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F (it is mentioned in almost every such topic!).
Title: Re: <iostream> not found, already searched the fourm
Post by: i3ear on October 10, 2011, 01:37:12 am
Alrighty did that, now where the fuck is that log? I just keep getting the same error even though I did what the FAQ told me to do, I just got the exact same error. Oh and I also reinstalled it this time too, using the Code Blocks installer to install Ming this time, like the first time.
Title: Re: <iostream> not found, already searched the fourm
Post by: stahta01 on October 10, 2011, 02:01:21 am
You need to read the link posted!
Quote
Remember the file extension matters: *.c is compiled as C file, *.cpp is compiled as C++ file. Read more
Title: Re: <iostream> not found, already searched the fourm
Post by: oBFusCATed on October 10, 2011, 08:36:56 am
Alrighty did that, now where the fuck is that log?
Please behave yourself!
The log has the pretty strange and unusual title "Build log"  :shock:, I guess it is normal for people to not see it  8)
Title: Re: <iostream> not found, already searched the fourm
Post by: Miagro on October 11, 2011, 12:01:52 pm
Hi, I think I was in the same shoes as you are. When you create your project choose "console application", in the next window C++, and when you name your project and C::B offers a filename automatically change this name from [name].cbp to [name].cpp ! Good luck!
Title: Re: <iostream> not found, already searched the fourm
Post by: Jenna on October 11, 2011, 12:13:30 pm
Hi, I think I was in the same shoes as you are. When you create your project choose "console application", in the next window C++, and when you name your project and C::B offers a filename automatically change this name from [name].cbp to [name].cpp ! Good luck!
Don't do that, it's complete bullshit (sorry).

Chose cpp as file-ending, if you create a C/C++-file ("File -> New -> File... -> C/C++-Source", but not ( n o t ) for your project-name.
Title: Re: <iostream> not found, already searched the fourm
Post by: Miagro on October 11, 2011, 01:07:14 pm
Listen to Jens! 1. Because I meant the filename too (I've tried to describe it that way but seemingly failed...) 2. He seems to talk more sense than I. :) Sorry if I said something "complete bullshit", I'm sure there is a more sophisticated way.