-
January 5th, 2009, 03:30 PM
#1
Newb Question
Alright. So I literally just started learning C++ from a tut I found and I ran into a problem.
#include <iostream.h>
int main()
{
cout<< " What you do is what you get";
}
This page: http://www.planet-source-code.com/vb...d=769&lngWId=3
has said tut on it.
This:
1. #include <iostream.h>
2. int main()
3. {
4. cout<< “ What you do is what you get”;
5. }
is what I was supposed to type out(without the letters). The only issue I see is that the first quotation mark look different than the last. However, I cannot find this specific symbol on my keyboard. I am in need of assistance.
Reader warning: This user will probably insult your mother and how she's so fat.
-
January 5th, 2009, 03:35 PM
#2
Re: Newb Question
Use the double quote for both of them.
-
January 5th, 2009, 03:42 PM
#3
Re: Newb Question
That tutorial is out of date. You should be using <iostream>, not <iostream.h> anymore.
-
January 5th, 2009, 03:42 PM
#4
Re: Newb Question
That's just it. From what I understand that is the key I used. Please do not mistake me for some moron who's never used a computer in his life. If this is, in fact, a learning environment then noob bashing would hardly be good for this forum's image. Not that I am accusing you of doing so.
Originally Posted by Lindley
That tutorial is out of date. You should be using <iostream>, not <iostream.h> anymore.
Thank you. However my original issue is still unresolved. I am receiving this error:
`cout' undeclared (first use this function)
Reader warning: This user will probably insult your mother and how she's so fat.
-
January 5th, 2009, 03:48 PM
#5
Re: Newb Question
Originally Posted by Syko
Thank you. However my original issue is still unresolved. I am receiving this error:
`cout' undeclared (first use this function)
That wasn't your original issue. I told you what to do with that.
-
January 5th, 2009, 03:51 PM
#6
Re: Newb Question
And I explained my predicament. I did, in fact, use the double quote key from what I understand. What I am asking of you is to provide proof opposing that the key I used was the correct one.
Reader warning: This user will probably insult your mother and how she's so fat.
-
January 5th, 2009, 03:53 PM
#7
Re: Newb Question
Originally Posted by Syko
And I explained my predicament. I did, in fact, use the double quote key from what I understand. What I am asking of you is to provide proof opposing that the key I used was the correct one.
Could it be that you're using the right key but the wrong editor ?
Kurt
-
January 5th, 2009, 03:55 PM
#8
Re: Newb Question
Ah. That may be it. The editor that I am using was downloaded from a link on the same site as the tut I used. I will find another more up to date editor and try this out once more.
Reader warning: This user will probably insult your mother and how she's so fat.
-
January 5th, 2009, 03:55 PM
#9
Re: Newb Question
Originally Posted by Syko
And I explained my predicament. I did, in fact, use the double quote key from what I understand. What I am asking of you is to provide proof opposing that the key I used was the correct one.
My keyboard only has one double quote key. It's the same double quote on both sides of the string. Other than telling you that's the way it works, there's no proof I can offer.
-
January 5th, 2009, 04:04 PM
#10
Re: Newb Question
I understand. I am still in the process if searching for a decent editor. I'm sure that was the problem. The tutorial itself was outdated which would mean the links in said tut would likely be outdated as well.
Reader warning: This user will probably insult your mother and how she's so fat.
-
January 5th, 2009, 04:08 PM
#11
Re: Newb Question
Any old editor will work so long as it doesn't try to "pretty-print" the quotes. You can use Notepad on Windows, emacs on Linux, whatever.
-
January 5th, 2009, 04:44 PM
#12
Re: Newb Question
How would I go about compiling and running if I used Notepad?
Reader warning: This user will probably insult your mother and how she's so fat.
-
January 5th, 2009, 04:47 PM
#13
Re: Newb Question
You could use a command-line compiler, naturally. That's not the best choice on Windows though. Just get Visual Studio Express 2008 there, I'd say.
-
January 5th, 2009, 04:55 PM
#14
Re: Newb Question
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
January 5th, 2009, 06:31 PM
#15
Re: Newb Question
Thank you. Your help is much appreciated.
Reader warning: This user will probably insult your mother and how she's so fat.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|