I have to read from input file (which contains strings and integers) only integers, rearrange them to descending order and write to output file.
How should I do this?
koitfm
0
Newbie Poster
Recommended Answers
Jump to PostIf you the format of the data then you can use the fscanf function
If not use read to read the contents of the file into a char array and then implement a parser to parse the data
Jump to Postfflush(stdin) -- See this
getch() -- See this
while (!feof(F1)) --
All 8 Replies
abhimanipal
91
Master Poster
jephthah
1,888
Posting Maven
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
koitfm
0
Newbie Poster
abhimanipal
91
Master Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
BestJewSinceJC
commented:
Good help to the OP
+5
koitfm
0
Newbie Poster
jephthah
1,888
Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.