Click here to Skip to main content
15,905,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionI donn't find the mistakes! Pin
greenapplezlp30-Dec-05 20:15
greenapplezlp30-Dec-05 20:15 
AnswerRe: I donn't find the mistakes! Pin
QuickDeveloper30-Dec-05 21:43
QuickDeveloper30-Dec-05 21:43 
Generalthank you for your enthusiastic help! Pin
greenapplezlp1-Jan-06 20:03
greenapplezlp1-Jan-06 20:03 
AnswerRe: I donn't find the mistakes! Pin
Polymorpher30-Dec-05 22:13
Polymorpher30-Dec-05 22:13 
GeneralRe: I donn't find the mistakes! Pin
greenapplezlp1-Jan-06 20:03
greenapplezlp1-Jan-06 20:03 
QuestionProblem regarding DirectShow Pin
StarMeteor30-Dec-05 16:46
StarMeteor30-Dec-05 16:46 
QuestionHow to write data to a file when it is in a vector Pin
Larry Mills Sr30-Dec-05 14:12
Larry Mills Sr30-Dec-05 14:12 
AnswerRe: How to write data to a file when it is in a vector Pin
Garth J Lancaster30-Dec-05 15:34
professionalGarth J Lancaster30-Dec-05 15:34 
I would suggest you would need to Serialize your data using CArchive .. Ive bolded those words - use them in google/your fav. search engine and you should be able to find enough examples out there (I dont have any to hand)

.. otoh, a quick look finds :-

http://www.cis.temple.edu/~wolfgang/MFC-STLPaper.PDF[^]

and, even better, a series of 3 articles written by CP guru Ravi Bhavnani, first one is at ...

http://www.codeproject.com/cpp/serialization_primer1.asp[^]

hope this gets you started

There are other ways of course .. you could
1a) open a text file for writing
1b) iterate through your vector
1c) for every class element stored, write the data components, seperated by a delimiter to the file
1d) close the file

2a) open the file for reading
2b) while not eof read a line from the file
2c) parse the line for the delimiters, giving you the data (see tokenising/delimters)
2d) create the class with the data from 2c
2e) store the class from 2d into a vector
2f) close the file

or write and read as xml .. depends what the objective of the exercise is really

'g'


-- modified at 21:48 Friday 30th December, 2005
GeneralRe: How to write data to a file when it is in a vector Pin
Larry Mills Sr1-Jan-06 16:45
Larry Mills Sr1-Jan-06 16:45 
GeneralRe: How to write data to a file when it is in a vector Pin
Garth J Lancaster1-Jan-06 19:34
professionalGarth J Lancaster1-Jan-06 19:34 
QuestionNeed Help with ShellExecute Pin
Klerik8230-Dec-05 10:53
Klerik8230-Dec-05 10:53 
AnswerRe: Need Help with ShellExecute Pin
Prakash Nadar30-Dec-05 18:14
Prakash Nadar30-Dec-05 18:14 
AnswerRe: Need Help with ShellExecute Pin
Michael Dunn31-Dec-05 10:50
sitebuilderMichael Dunn31-Dec-05 10:50 
AnswerRe: Need Help with ShellExecute Pin
Klerik822-Jan-06 13:03
Klerik822-Jan-06 13:03 
QuestionMFC Serialization Questions.. Pin
montiee30-Dec-05 6:09
montiee30-Dec-05 6:09 
AnswerRe: MFC Serialization Questions.. Pin
Ravi Bhavnani30-Dec-05 6:59
professionalRavi Bhavnani30-Dec-05 6:59 
GeneralRe: MFC Serialization Questions.. Pin
Garth J Lancaster30-Dec-05 15:35
professionalGarth J Lancaster30-Dec-05 15:35 
GeneralRe: MFC Serialization Questions.. Pin
montiee30-Dec-05 16:54
montiee30-Dec-05 16:54 
GeneralRe: MFC Serialization Questions.. Pin
Ravi Bhavnani31-Dec-05 5:14
professionalRavi Bhavnani31-Dec-05 5:14 
AnswerRe: MFC Serialization Questions.. Pin
ToxickZero30-Dec-05 9:34
ToxickZero30-Dec-05 9:34 
GeneralRe: MFC Serialization Questions.. Pin
montiee30-Dec-05 17:04
montiee30-Dec-05 17:04 
AnswerRe: MFC Serialization Questions.. Pin
Cliff Hatch1-Jan-06 0:53
Cliff Hatch1-Jan-06 0:53 
GeneralRe: MFC Serialization Questions.. Pin
Cliff Hatch2-Jan-06 0:54
Cliff Hatch2-Jan-06 0:54 
QuestionHow to resize child window Pin
shivditya30-Dec-05 5:24
shivditya30-Dec-05 5:24 
AnswerRe: How to resize child window Pin
John R. Shaw31-Dec-05 18:55
John R. Shaw31-Dec-05 18:55 

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.