I/O function misunderstanding

Reply

Join Date: Oct 2009
Posts: 61
Reputation: neithan is an unknown quantity at this point 
Solved Threads: 2
neithan's Avatar
neithan neithan is offline Offline
Junior Poster in Training

I/O function misunderstanding

 
0
  #1
27 Days Ago
Hi everyone. I am so confused in input and output! I'm following what it looked to be a nice tutorial from VTC and it shows how to use scanf and printf.
But i'm seeing everywhere things like printf and scanf and getc, getch, puts, gets...wtf? I learnt the diff between getc and getch, but i dont know which one should i use, why one is better than another...
In the other hand in this video he's using c = getchar() to get letters from the keyboard being c an integer?!
I also don't know what's exactly a buffer, when to flush it, and how this exactly works.

Pointers went good but i'm really stuck with i/o functions. Can anyone point a good tutorial/manual/video/examples of these so i can learn this issue for once? It's no problem if it's too extense or detailed, i want to understand it from the lowest.

Thank you!
Last edited by neithan; 27 Days Ago at 1:23 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 681
Reputation: Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of Tom Gunn has much to be proud of 
Solved Threads: 132
Tom Gunn's Avatar
Tom Gunn Tom Gunn is offline Offline
Practically a Master Poster
 
0
  #2
27 Days Ago
I/O is kind of complicated in C. Can you list out your questions so that it is easier to answer them? I will be happy to give you all of the details you want, but right now it feels like I would end up writing a small book.
-Tommy (For Great Justice!) Gunn
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 61
Reputation: neithan is an unknown quantity at this point 
Solved Threads: 2
neithan's Avatar
neithan neithan is offline Offline
Junior Poster in Training
 
0
  #3
27 Days Ago
Originally Posted by Tom Gunn View Post
I/O is kind of complicated in C. Can you list out your questions so that it is easier to answer them? I will be happy to give you all of the details you want, but right now it feels like I would end up writing a small book.

Well, that would be nice but that's why i asked for manuals etc because i think i'm gonna need a lot of info to really learn the I/O in C.
I mean i don't have an exact question, is the whole issue that i want to know and i havent found anything that covered all of them and explained nicely why and how to use each of them.

Really isn't there any guide or something to master something that important in C like it is I/O?

Thank you for your time!
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei
 
0
  #4
27 Days Ago
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 61
Reputation: neithan is an unknown quantity at this point 
Solved Threads: 2
neithan's Avatar
neithan neithan is offline Offline
Junior Poster in Training
 
0
  #5
26 Days Ago
Originally Posted by WaltP View Post
Try this...
Oh, google, how didn't i though of that?

I actually googled that before asking but i found C++, file input output or incomplete information in plain C I/O that's why i asked if you happen to know a good resource.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2,029
Reputation: Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of 
Solved Threads: 176
Aia's Avatar
Aia Aia is offline Offline
Postaholic
 
0
  #6
26 Days Ago
Originally Posted by neithan View Post
Oh, google, how didn't i though of that?
Google: the response to much and the answer to nothing.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,567
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 707
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess
 
0
  #7
26 Days Ago
>Google: the response to much and the answer to nothing.
If you can't find complete information about I/O in C from google, you're either an idiot or a liar. It's easier just to say that you were too lazy to do a thorough search and need someone to point you to the one true reference.
Last edited by Narue; 26 Days Ago at 7:48 pm.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2,029
Reputation: Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of 
Solved Threads: 176
Aia's Avatar
Aia Aia is offline Offline
Postaholic
 
0
  #8
26 Days Ago
>If you can't find complete information about I/O in C from google, you're either an idiot or a liar.
Does it have to be so binary?
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 61
Reputation: neithan is an unknown quantity at this point 
Solved Threads: 2
neithan's Avatar
neithan neithan is offline Offline
Junior Poster in Training
 
0
  #9
25 Days Ago
Originally Posted by Aia View Post
Does it have to be so binary?
It seems that is. Although Narue forgot to mention a beginner once failed seeking a very specific resource by himself in a subject he is totally new to.

Originally Posted by Narue View Post
>Google: the response to much and the answer to nothing.
If you can't find complete information about I/O in C from google, you're either an idiot or a liar. It's easier just to say that you were too lazy to do a thorough search and need someone to point you to the one true reference.
Yes that seems to be what i was looking for. It's a shame that you think insulting people makes you look smarter, though. Maybe next time you improve your spotting system of trolls and avoid embarrassing yourself like that.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,567
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 707
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess
 
0
  #10
25 Days Ago
>>If you can't find complete information about I/O in C from google, you're either an idiot or a liar.
>Does it have to be so binary?

In my experience, yes.

>Although Narue forgot to mention a beginner once failed seeking
>a very specific resource by himself in a subject he is totally new to.

No, Narue just skipped to the end result of providing the best possible reference. I could easily show you that a braindead google search string would result in enough information on the subject to fill the Library of Congress. But I didn't want to embarrass you too much by proving that the only person who can't find complete information on google is too stupid to be a programmer, or didn't actually search google.

>It's a shame that you think insulting people makes you look smarter, though.
You have no idea what I'm thinking, so please keep those faux omniscient statements to yourself.

>Maybe next time you improve your spotting system of trolls and avoid embarrassing yourself like that.
It takes quite a bit more than a whiney noob to embarrass me. Also note that I never called you a troll. I'm not sure where that came from. Trolls have completely different behavior patterns.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC