#1 Edited by SexyToad (2760 posts) -

I'm so confused. I bought two books, I bought beginning c++ through game designing and C++ Primer Plus. I'm reading through them and trying some of the stuff out but I can't even get a screen to come up to say a word. Both of the books start with being able to make a word or sentences pop up. I typed the code exactly how it said to. But then my IDE program saids I'm missing iostream. Both of the book saids to type #include iostream. Edit: My phone is creating typos, here's the page since I'm on my phone.

#2 Posted by SSully (4117 posts) -

Copy and paste your code here please.

#3 Edited by WickedFather (1730 posts) -

Have you done either of these at the top? If not then do it.

#include <iostream>

#include <iostream.h>

#4 Edited by Dagbiker (6939 posts) -

I have no idea how to help you because your parigraph was nonsense.

But it sounds like you need to #include iosstream

Your missing a link in your compiler, thats what it sounds like.

#5 Posted by Amtiskaw (59 posts) -

It's iostream (short for input/output stream), not iosstream. Just adding

#include <iostream>

to the top should work.

#6 Posted by SSully (4117 posts) -

@Dagbiker said:

I have no idea how to help you because your parigraph was nonsense.

But it sounds like you need to #include iosstream

Your missing a link in your compiler, thats what it sounds like.

It actually wasn't nonsense. Some bad grammar, but nothing to put the guy down about.

#7 Posted by Dagbiker (6939 posts) -

@SSully said:

@Dagbiker said:

I have no idea how to help you because your parigraph was nonsense.

But it sounds like you need to #include iosstream

Your missing a link in your compiler, thats what it sounds like.

It actually wasn't nonsense. Some bad grammar, but nothing to put the guy down about.

Your right.

#8 Posted by MC_Hify (319 posts) -

@Dagbiker said:

@SSully said:

@Dagbiker said:

I have no idea how to help you because your parigraph was nonsense.

But it sounds like you need to #include iosstream

Your missing a link in your compiler, thats what it sounds like.

It actually wasn't nonsense. Some bad grammar, but nothing to put the guy down about.

Your right.

http://instantrimshot.com/

Online
#9 Posted by Echofoxz (98 posts) -

<iostream> is the library you will be using in your program, which includes cout, cin, etc.

There are other libraries you can use, such as <cmath>, <vector>, <fstream>, those are just the basic ones, there are a lot more.

#10 Posted by SexyToad (2760 posts) -

There fixed the typos and grammar issues, also added the code.

#11 Posted by Renahzor (987 posts) -

@SexyToad: What program/compiler are you writing your code in? If you copy paste that code directly it should work unless you have some setup issues in whatever compiler you're running (or say, picked a wrong project type in visual C++ etc).

#12 Posted by OllyOxenFree (4970 posts) -
@Dagbiker said:

@SSully said:

@Dagbiker said:

I have no idea how to help you because your parigraph was nonsense.

But it sounds like you need to #include iosstream

Your missing a link in your compiler, thats what it sounds like.

It actually wasn't nonsense. Some bad grammar, but nothing to put the guy down about.

Your right.

Tee hee.
#13 Edited by yami4ct (154 posts) -

Are you using #include <iostream> or #include <iostream.h>? If you aren't using .h, I believe you need to do a "using namespace std;" (without the quotes of course) in your header for the code to work.

#14 Posted by Amtiskaw (59 posts) -

@yami4ct: <iostream.h> is deprecated and 'using namespace std;' is only needed if you don't want to write 'std::cout', 'std::cin', ... all the time, and just write 'cout', 'cin', ...

#15 Posted by Butano (1728 posts) -

Some compilers can be really finicky when it comes to header files. Have you tried #include <iostream.h>? Sometimes they need that .h at the end just to be sure.

#16 Posted by Renahzor (987 posts) -

@yami4ct: He doesn't need to declare namespace std since that code identifies each namespace for the components that need it (std::cout). His compiler is not finding iostream at all, so its likely just an issue with where his IDE is pointing to try and find those files.

#17 Posted by yami4ct (154 posts) -

@Amtiskaw: Ahhh. Thanks for pointing that out. I was never taught the long way, so that went right over my head. You learn something new every day.

#18 Posted by EquitasInvictus (1947 posts) -

@SexyToad: Which IDE are you using? If you're still having a problem, you might just have to switch IDEs. A lot of people will say "don't use an IDE period," but if you're just starting out it's understandably tough to figure it out without having an IDE backing you up. I, for one, started using Windows' Visual C++ before I really got into compiling straight-up on Linux via the GCC compiler.

#19 Posted by SexyToad (2760 posts) -

My IDE is making a .cbp format. I need a .cpp format, right? What project am I to click on when I start. I'm trying console application but that's not making the correct format.

#20 Posted by EquitasInvictus (1947 posts) -

@SexyToad: Yeah I don't remember ever seeing .cbp before, it must be specific to the IDE you're using.

Most compilers I've encountered will only compile C++ as (.cpp or .h if it's a header, or some variation of c's, p's, h's and x's.)

#21 Posted by AlianthaBerries (142 posts) -
@Renahzor What?! Copy/Paste is unforgivable for anyone who isn't a professional. Don't even suggest it.
#22 Posted by Renahzor (987 posts) -

@AlianthaBerries: I meant it in a figurative manner! ;) regardless his issue is now fixed through PMs, picked a wrong option in his IDE probably making it a .c file, which doesn't recognize iostream.

#23 Posted by SexyToad (2760 posts) -

Okay I got it working, the project I was choosing wasnt the correct one and .cbp is just the ide format. Thank you to ones who actually tried helping. Renahzor helped me figured it out.

#24 Edited by Amtiskaw (59 posts) -

It sounds like you're using Code::Blocks. The .cbp file is just a file that stores compiler settings and a list of the files in your project. Console application is the correct project type so that shouldn't be the problem.

When you installed your IDE, did you use codeblocks-10.05-setup.exe or codeblocks-10.05mingw-setup.exe?

Edit: whoops, didn't see the posts on the second page, so just disregard this post.

#25 Posted by Dexter_Morgan_ (314 posts) -

How sexy.