
-----------------------------------
nemisis652
Thu Apr 30, 2009 6:11 pm

Help!
-----------------------------------
Hey, 
im very new to C++ and have taken measures to aquire a copy of "C++ for Dummies" which comes with a CD-ROM with a copy of Dev-C++ and some source code in the book, however i dont have that CD so i am forced to write the code in the book out by hand and into my downloaded Beta Copy of Dev-C++ (version 5 i believe)

well my problem is i am running into errors when compiling the code I'm inputting into the Dev and i am not sure what the problem is, because i am inputting the code exactly as is. So my two thoughts are: 1) im missing something that the CDROM has that the book isnt showing 2) The Dev im running is bugged

The errors im getting are with the cout and cin statements and its telling me that they are undeclared.
this is my code: 

//BoolTest - compare variables input from the
//           keyboard and store the results off 
//           into a logical variable 
#include 
#include 
#include 

int main(int nNumberofArgs, char* pszArgs

im sorry in advance if im posting my question wrong, or posting my code wrong. Not only am i new at C++ but im new at Compsci.
Any help would be greatly appreciated as i need to learn this as fast as possible!
Thanks! :)


Mod Edit: Remember to use syntax tags! Thanks :) Code Here

-----------------------------------
Insectoid
Thu Apr 30, 2009 6:23 pm

RE:Help!
-----------------------------------
Loving that thread title, nemesis. Very descriptive.

-----------------------------------
nemisis652
Thu Apr 30, 2009 6:26 pm

RE:Help!
-----------------------------------
lol i just thought it would catch some attention, i suppose it worked. :P

Sorry though! theres always next time.

-----------------------------------
Insectoid
Thu Apr 30, 2009 6:49 pm

RE:Help!
-----------------------------------
It didn't work. There are hundreds of posts with this or similar names every year. Be creative, and think a bit. Am I the first to post something about help? 

Anywho, it looks like you're putting effort into this and while I can't help you (don't know the first thing about C++), I'm sure somebody will.

-----------------------------------
zero-impact
Thu Apr 30, 2009 6:51 pm

RE:Help!
-----------------------------------
The problem is you need to do it like this
[code]std::cout > variable;
[/code]

otherwise add

[code]using namespace std;[/code]
Just after your #includes.

-----------------------------------
nemisis652
Thu Apr 30, 2009 7:13 pm

RE:Help!
-----------------------------------
okay thank you so much, it cleared up my problems but im having one more and its come up a few times in other programs, maybe you guys can help me out.

in the book its telling me to use a function 'end1', while the book says that it creates a new-line, my version of Dev-C++ says its undeclared. As i previously said im extremely new so im just guessing, but would it work to declare end1 a '/n' to make it a new line, or does that only work in strings?

p.s. insectoid, your right about the hastiness about my post, but im really putting my all into it and i guess i didnt lurk the forum enough to really get a handle on how things work around here. Not only am i learning C++ but im learning the nuances of this forum and i look forward to being a (hopefully) skilled contributing member to this community.

-----------------------------------
saltpro15
Thu Apr 30, 2009 7:18 pm

RE:Help!
-----------------------------------
way to kiss ass ;)  and you're reading it wrong, its endl, not end1, it looks like this

cout 