cin means c input , you need a variable to take the input. Here is an example
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--> int homerx; cin >> homerx; <!--c2--></td></tr></table><div class='postcolor'><!--ec2--> The variable stores the input for later use. And in the console window there will be those blinky lines waiting for user input.
cout mean c out, this basically puts text on the console. Example:
This makes more sense when you get into classes (make your own string class, or something similar) and you start overloading the insertion and extraction operators.
NarfwakJoin Date: 2002-11-02Member: 5258Members, Super Administrators, Forum Admins, NS1 Playtester, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, Subnautica PT Lead, NS2 Community Developer
Java is much less arcane when it comes to input/output stuff, but then again, it's Java, so you can't actually use it for much of anything. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
<!--QuoteBegin-Narfwak+Apr 18 2004, 12:59 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Narfwak @ Apr 18 2004, 12:59 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Java is much less arcane when it comes to input/output stuff, but then again, it's Java, so you can't actually use it for much of anything. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd--> java is annoying
<!--QuoteBegin-OttoDestruct+Apr 18 2004, 10:54 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (OttoDestruct @ Apr 18 2004, 10:54 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> This makes more sense when you get into classes (make your own string class, or something similar) and you start overloading the insertion and extraction operators. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd--> Bah! Those are shift operators! std::string just uses them for stream I/O.
Comments
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
int homerx;
cin >> homerx;
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
The variable stores the input for later use. And in the console window there will be those blinky lines waiting for user input.
cout mean c out, this basically puts text on the console. Example:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
cout << "Homerx" << endl;
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
This puts homerx on the console window. or you can do it with a variable.
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
char homerx = "S";
cout << homerx << endl;
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Hope this helps, here are some great links for tutorials
<a href='http://www.cprogramming.com' target='_blank'>Tutorial page 1</a>
<a href='http://www.cpp-home.com' target='_blank'>Tutorial page 2</a>
(usually the console) but they can be set to in/out to/from other places
java is annoying
<-- knows that they do, but doesn't have a compiler, or taken a class in 3 years.
Bah! Those are shift operators! std::string just uses them for stream I/O.