GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Sep-2006, 22:02
prince87x prince87x is offline
New Member
 
Join Date: Sep 2006
Posts: 2
prince87x is on a distinguished road

basic input question


I am still pretty new to C/C++. Could anyone link a tutorial or tell me how I could go about outputting input right away. scanf and getchar seem to both wait for a carriage return.
  #2  
Old 27-Sep-2006, 23:49
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,234
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: basic input question


Not really. At least not without venturing into non-standard functions that only work in a select few compilers. Although IMO you should stay away from scanf(). Here's why
__________________

Cow: You're a lawyer too?
Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase!
  #3  
Old 27-Sep-2006, 23:53
prince87x prince87x is offline
New Member
 
Join Date: Sep 2006
Posts: 2
prince87x is on a distinguished road

Re: basic input question


Ah alright, what you are saying then is it would be very tricky to display a character right after a key is pressed without enter needing to be pressed? Do you have any suggestions about the subject or is it a waste of time?
  #4  
Old 28-Sep-2006, 00:41
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,234
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: basic input question


What I'm saying is it is not a standard way for C/C++ to handle the keyboard. There are functions that do it, but they cannot be relied upon to exist if you change compilers (assuming your compiler does it in the first place).

There is a place for that type of input, but it's a rare need.
__________________

Cow: You're a lawyer too?
Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase!
  #5  
Old 30-Sep-2006, 14:16
macrolinx's Avatar
macrolinx macrolinx is offline
New Member
 
Join Date: Sep 2006
Location: Currently in Sri Lanka but I'm actually from Maldives.
Posts: 7
macrolinx is on a distinguished road

Re: basic input question


hello.. could anyone email me a few scanf basic source codes. im quite new to c programming and need a little help here from the gurus. my emails skamaldeen@gmail.com

thanx
  #6  
Old 30-Sep-2006, 15:53
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,108
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: basic input question


Follow WaltP's link in his first reply. There are all kinds of examples of scanf usage along with better ways to skin that cat.
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #7  
Old 30-Sep-2006, 17:52
macrolinx's Avatar
macrolinx macrolinx is offline
New Member
 
Join Date: Sep 2006
Location: Currently in Sri Lanka but I'm actually from Maldives.
Posts: 7
macrolinx is on a distinguished road
Smile

Re: basic input question


thanx alot cable_guy_67
  #8  
Old 30-Sep-2006, 17:55
macrolinx's Avatar
macrolinx macrolinx is offline
New Member
 
Join Date: Sep 2006
Location: Currently in Sri Lanka but I'm actually from Maldives.
Posts: 7
macrolinx is on a distinguished road
Exclamation

Re: basic input question


hey anybody direct me to where i can get the latest version of turbo C IDE... i've tried different locations.. even the borland website... but cant download it to my email. if you've got the .zip ver please email me @ skamaldeen@gmail.com or direct me a link.

Thanx in advance!
  #9  
Old 30-Sep-2006, 20:26
ubergeek ubergeek is offline
Regular Member
 
Join Date: Jan 2005
Posts: 775
ubergeek is a jewel in the roughubergeek is a jewel in the roughubergeek is a jewel in the rough

Re: basic input question


I found this Wikipedia entry on Turbo C. But why would you want it? It's extremely old, and there are better free compilers out there.
  #10  
Old 30-Sep-2006, 20:41
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,234
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: basic input question


Best to use either
Bloodshed DevC
Borland 5.5

And please don't hijack someone else's thread. Your question is off topic for the help he's requesting.
__________________

Cow: You're a lawyer too?
Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase!
 

Recent GIDBlog2nd Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Temperature Conversion Error Cecil C Programming Language 8 28-May-2006 20:09
Basic file copy question earachefl CPP / C++ Forum 2 13-Apr-2006 14:46
Question Passing Variables (Visual Basic & HTTP) pcxgamer Open Discussion Forum 0 28-Feb-2006 00:46
a C input question.. tmike C Programming Language 2 19-Sep-2003 02:39
a C input question tmike C Programming Language 1 16-Sep-2003 02:31

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:04.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.