Click here to Skip to main content
15,908,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRedirection in command line "<" Pin
uusheikh25-Mar-08 17:30
uusheikh25-Mar-08 17:30 
GeneralRe: Redirection in command line "<" Pin
User 58385225-Mar-08 17:59
User 58385225-Mar-08 17:59 
GeneralRe: Redirection in command line "<" Pin
fefe.wyx25-Mar-08 18:21
fefe.wyx25-Mar-08 18:21 
GeneralRe: Redirection in command line "<" Pin
uusheikh25-Mar-08 20:18
uusheikh25-Mar-08 20:18 
GeneralRe: Redirection in command line "<" Pin
Maxwell Chen25-Mar-08 21:03
Maxwell Chen25-Mar-08 21:03 
GeneralRe: Redirection in command line "<" Pin
uusheikh25-Mar-08 21:25
uusheikh25-Mar-08 21:25 
GeneralRe: Redirection in command line "<" Pin
Maxwell Chen25-Mar-08 21:18
Maxwell Chen25-Mar-08 21:18 
GeneralRe: Redirection in command line "<" Pin
David Crow26-Mar-08 4:10
David Crow26-Mar-08 4:10 
uus831 wrote:
But how do i determine how much data to read from the file? I mean, if the file in.txt contains 10 rows of data, how can i determine that i need to call scanf 10 times?


fscanf() will tell you when it has read past the end of the file stream:

while (fscanf(stdin, ...) != EOF)
{
    ...
}


"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


QuestionHow to insert a child form? Pin
TooShy2Talk25-Mar-08 16:48
TooShy2Talk25-Mar-08 16:48 
QuestionUsing CFileDialog? Pin
dipuks25-Mar-08 15:59
dipuks25-Mar-08 15:59 
AnswerRe: Using CFileDialog? Pin
David Crow25-Mar-08 16:11
David Crow25-Mar-08 16:11 
GeneralCompare and merge Pin
KirkNarine25-Mar-08 9:15
KirkNarine25-Mar-08 9:15 
GeneralRe: Compare and merge Pin
led mike25-Mar-08 10:14
led mike25-Mar-08 10:14 
AnswerRe: Compare and merge Pin
Maxwell Chen25-Mar-08 17:50
Maxwell Chen25-Mar-08 17:50 
QuestionMethod to get file path Pin
nvphap25-Mar-08 8:55
nvphap25-Mar-08 8:55 
GeneralRe: Method to get file path Pin
David Crow25-Mar-08 10:05
David Crow25-Mar-08 10:05 
GeneralRe: Method to get file path Pin
led mike25-Mar-08 10:12
led mike25-Mar-08 10:12 
GeneralRe: Method to get file path Pin
nvphap25-Mar-08 16:55
nvphap25-Mar-08 16:55 
GeneralRe: Method to get file path Pin
Mark Salsbery25-Mar-08 17:07
Mark Salsbery25-Mar-08 17:07 
GeneralRe: Method to get file path Pin
nvphap25-Mar-08 21:35
nvphap25-Mar-08 21:35 
GeneralRe: Method to get file path Pin
nvphap26-Mar-08 0:42
nvphap26-Mar-08 0:42 
GeneralRe: Method to get file path Pin
ramana.g26-Mar-08 2:06
ramana.g26-Mar-08 2:06 
QuestionWhich is Better Pro*C/C++ or C# ??? Pin
Amit4u25-Mar-08 7:02
Amit4u25-Mar-08 7:02 
GeneralRe: Which is Better Pro*C/C++ or C# ??? Pin
Randor 25-Mar-08 7:18
professional Randor 25-Mar-08 7:18 
GeneralRe: Which is Better Pro*C/C++ or C# ??? Pin
Maximilien25-Mar-08 7:19
Maximilien25-Mar-08 7:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.