News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

<iostream> not found, already searched the fourm

Started by i3ear, October 09, 2011, 10:39:30 PM

Previous topic - Next topic

i3ear

Hello, I am a C++ noob, but I am pretty sure this isn't my fault.
This is what I am trying to compile
#include <iostream>
using namespace std;

int main() {
cout << "Hello World I am " <<8<< " Today!" << endl;
} ///:~

This is the error I get
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. :(

oBFusCATed

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!).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

i3ear

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.

stahta01

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
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Quote from: i3ear on October 10, 2011, 01:37:12 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)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Miagro

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!

Jenna

Quote from: 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!
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.

Miagro

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.