Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Interdependent classes Pin
Christian Graus15-Aug-06 11:03
protectorChristian Graus15-Aug-06 11:03 
GeneralRe: Interdependent classes Pin
CoolASL15-Aug-06 22:07
CoolASL15-Aug-06 22:07 
AnswerRe: Interdependent classes [modified] Pin
Zac Howland15-Aug-06 9:42
Zac Howland15-Aug-06 9:42 
GeneralRe: Interdependent classes Pin
BadKarma15-Aug-06 21:07
BadKarma15-Aug-06 21:07 
GeneralRe: Interdependent classes Pin
CoolASL15-Aug-06 22:09
CoolASL15-Aug-06 22:09 
GeneralRe: Interdependent classes Pin
Zac Howland16-Aug-06 5:01
Zac Howland16-Aug-06 5:01 
GeneralRe: Interdependent classes Pin
CoolASL15-Aug-06 22:08
CoolASL15-Aug-06 22:08 
QuestionFile reading and writing Pin
69 Bay14-Aug-06 23:51
69 Bay14-Aug-06 23:51 
Hi
I am looking for a tutorial for file input and output. I am currently using the C FILE, fgets, fgetc, etc, but should update to a more up to date technique. What is the best way of reading\writing to (normally) text files? I am using VC++ (6.0)

If I wish to update a section of a text file, I currently do :
1) read in the info upto the point to be updated from "original.txt" and write this into "tmp.txt" file
2) write the updated block to "tmp.txt"
3) read in the old block from "original.txt", but dont do anything with it
4) write all the remaining info from "original.txt" to "tmp.txt"
5) close all files
6) delete "original.txt" file
7) rename "tmp.txt" file to "original.txt"

This works, but is there a much less labourious way to do this sort of thing?

Excuse me for asking what is probably a very basic question - but if you dont ask...!

I hope you can help me out again

69 Bay
AnswerRe: File reading and writing Pin
Christian Graus15-Aug-06 0:03
protectorChristian Graus15-Aug-06 0:03 
GeneralRe: File reading and writing Pin
69 Bay15-Aug-06 5:10
69 Bay15-Aug-06 5:10 
GeneralRe: File reading and writing Pin
Zac Howland15-Aug-06 9:50
Zac Howland15-Aug-06 9:50 
GeneralRe: File reading and writing Pin
69 Bay16-Aug-06 2:34
69 Bay16-Aug-06 2:34 
GeneralRe: File reading and writing Pin
Zac Howland16-Aug-06 5:05
Zac Howland16-Aug-06 5:05 
GeneralRe: File reading and writing Pin
Christian Graus15-Aug-06 11:03
protectorChristian Graus15-Aug-06 11:03 
QuestionRe: File reading and writing Pin
David Crow15-Aug-06 4:08
David Crow15-Aug-06 4:08 
AnswerRe: File reading and writing Pin
69 Bay15-Aug-06 5:05
69 Bay15-Aug-06 5:05 
QuestionIActiveDesktop Pin
Rinu_Raj14-Aug-06 23:03
Rinu_Raj14-Aug-06 23:03 
AnswerRe: IActiveDesktop [modified] Pin
Rinu_Raj14-Aug-06 23:08
Rinu_Raj14-Aug-06 23:08 
AnswerRe: IActiveDesktop Pin
Hamid_RT14-Aug-06 23:18
Hamid_RT14-Aug-06 23:18 
Questionsecurity library for Windows Mobile? Pin
George_George14-Aug-06 22:48
George_George14-Aug-06 22:48 
AnswerRe: security library for Windows Mobile? Pin
Mike Dimmick15-Aug-06 1:26
Mike Dimmick15-Aug-06 1:26 
GeneralRe: security library for Windows Mobile? Pin
George_George15-Aug-06 3:07
George_George15-Aug-06 3:07 
QuestionQuestion on Windows Network drive Pin
Jagadeesh VN14-Aug-06 22:43
Jagadeesh VN14-Aug-06 22:43 
QuestionI need help to create a basic program about series. Pin
magnifisa14-Aug-06 22:34
magnifisa14-Aug-06 22:34 
QuestionRe: I need help to create a basic program about series. Pin
David Crow15-Aug-06 4:10
David Crow15-Aug-06 4:10 

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.