Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > 2+2 Communities > Other Other Topics
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2005, 10:50 PM
Maulik Maulik is offline
Senior Member
 
Join Date: Jan 2005
Location: 30 + rake
Posts: 892
Default cout what?

cout << variable;

or

cout >> variable;
Reply With Quote
  #2  
Old 05-17-2005, 10:53 PM
Gamblor Gamblor is offline
Senior Member
 
Join Date: Jan 2003
Location: Toronto
Posts: 2,085
Default Re: cout what?

doesn't your compiler tell you?
Reply With Quote
  #3  
Old 05-17-2005, 10:57 PM
PoBoy321 PoBoy321 is offline
Senior Member
 
Join Date: Aug 2004
Posts: 396
Default Re: cout what?

I'm pretty sure it's cout >> variable

Of course, I haven't done any C++ in like 3 years.
Reply With Quote
  #4  
Old 05-17-2005, 11:09 PM
TheCodeDog TheCodeDog is offline
Junior Member
 
Join Date: Jul 2004
Posts: 3
Default Re: cout what?

cout << variable;

To remember, cout is output and look at what direction the less than signs seem to indicate.
Reply With Quote
  #5  
Old 05-17-2005, 11:22 PM
jakethebake jakethebake is offline
Junior Member
 
Join Date: Feb 2004
Posts: 9
Default Re: cout what?

are you people speaking english?
Reply With Quote
  #6  
Old 05-17-2005, 11:23 PM
GrunchCan GrunchCan is offline
Senior Member
 
Join Date: Aug 2004
Location: Jundland Wastes
Posts: 595
Default Re: cout what?

cout << variable.

cin >> variable.
Reply With Quote
  #7  
Old 05-17-2005, 11:28 PM
Maulik Maulik is offline
Senior Member
 
Join Date: Jan 2005
Location: 30 + rake
Posts: 892
Default Re: cout what?

computer sciences


thanks
Reply With Quote
  #8  
Old 05-17-2005, 11:33 PM
mason55 mason55 is offline
Senior Member
 
Join Date: Sep 2004
Location: All Sin Begins With Emotion
Posts: 801
Default Re: cout what?

cout << variable
the data is going from the variable to the console

cin >> variable
the data is going from the console to the variable

just pretend they're arrows and its' easy to remember
Reply With Quote
  #9  
Old 05-17-2005, 11:37 PM
GrunchCan GrunchCan is offline
Senior Member
 
Join Date: Aug 2004
Location: Jundland Wastes
Posts: 595
Default Re: cout what?

[ QUOTE ]
just pretend they're arrows and its' easy to remember

[/ QUOTE ]

Yup, and I believe that's why B.S. chose << and >> to be the stream insertion/extracton operators in the first place, as opposed to some other operator.
Reply With Quote
  #10  
Old 05-17-2005, 11:42 PM
mason55 mason55 is offline
Senior Member
 
Join Date: Sep 2004
Location: All Sin Begins With Emotion
Posts: 801
Default Re: cout what?

[ QUOTE ]
[ QUOTE ]
just pretend they're arrows and its' easy to remember

[/ QUOTE ]

Yup, and I believe that's why B.S. chose << and >> to be the stream insertion/extracton operators in the first place, as opposed to some other operator.

[/ QUOTE ]

yeah. let's not get into a discussion about overloading those operators and the ridiculousness of making that the first thing most people learn.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.