Question:: reading from an input stream.

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2004
Posts: 7
Reputation: Nyika is an unknown quantity at this point 
Solved Threads: 0
Nyika Nyika is offline Offline
Newbie Poster

Question:: reading from an input stream.

 
0
  #1
Dec 11th, 2004
When reading character data from an input stream, what is the difference between using the >> operator and using the `get` function?
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 8
Reputation: WrEcK is an unknown quantity at this point 
Solved Threads: 0
WrEcK WrEcK is offline Offline
Newbie Poster

Re: Question:: reading from an input stream.

 
0
  #2
Dec 12th, 2004
get doesn't skip whitespace
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2
Reputation: Israelside is an unknown quantity at this point 
Solved Threads: 0
Israelside Israelside is offline Offline
Newbie Poster

Re: Question:: reading from an input stream.

 
0
  #3
Dec 12th, 2004
get function just reads a character at a time, >> operator reads until new line is detected or otherwise specfiied. getline function reads all space on one line even white space
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 140
Reputation: anastacia is an unknown quantity at this point 
Solved Threads: 1
anastacia's Avatar
anastacia anastacia is offline Offline
Junior Poster

Re: Question:: reading from an input stream.

 
0
  #4
Dec 12th, 2004
>> will pead data until a space character is met. this means that if u need to enter the address os sombody u cannot use>> u hav to use cin.getline. wtas the difference. wiz cin.getline u can enter all chracters including a space one
:lol: I am not one of those who wait for things to happen, :p but one of those who make things happen ;)
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 14
Reputation: Tresa is an unknown quantity at this point 
Solved Threads: 0
Tresa Tresa is offline Offline
Newbie Poster

Re: Question:: reading from an input stream.

 
0
  #5
Dec 12th, 2004
>> won't read white spaces. with gets u can.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC