C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 16th, 2006, 04:02 PM
romulus romulus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 2 romulus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 54 sec
Reputation Power: 0
Question Scanf&cout<<flush

i have something to ask?do you know any ways to get character
except of(scanf,gets)in c?(not in c++ )
and i have another ;in c++ there is something like " cout<<flush;"
and i want to use it in c but i defined my main program as main.c can someone help?

Reply With Quote
  #2  
Old March 16th, 2006, 06:55 PM
Cirus Cirus is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 276 Cirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 11 h 48 m 58 sec
Reputation Power: 4
Quote:
Originally Posted by romulus
i have something to ask?do you know any ways to get character
except of(scanf,gets)in c?(not in c++ )
and i have another ;in c++ there is something like " cout<<flush;"
and i want to use it in c but i defined my main program as main.c can someone help?


getch() is another method. The cout in C++ is not a sole method but a member of class iostream.What do you want exactly?

Reply With Quote
  #3  
Old March 17th, 2006, 07:02 PM
ubergeek ubergeek is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2005
Posts: 600 ubergeek User rank is Private First Class (20 - 50 Reputation Level)ubergeek User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 40 m 27 sec
Reputation Power: 4
Send a message via AIM to ubergeek
i think you may want fflush()

Reply With Quote
  #4  
Old March 18th, 2006, 06:20 AM
Cirus Cirus is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 276 Cirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 11 h 48 m 58 sec
Reputation Power: 4
fflush is for emptying a buffer after an operation. I still do not know what do you mean by your question but can guess that you are trying to read a string into a buffer and then fflush it to console.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Scanf&cout<<flush


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT