Click here to Skip to main content
15,917,176 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I check a folder to see if there is a specific file exist or not? Pin
StarMeteor23-Mar-04 7:25
StarMeteor23-Mar-04 7:25 
GeneralRe: How can I check a folder to see if there is a specific file exist or not? Pin
David Crow23-Mar-04 8:10
David Crow23-Mar-04 8:10 
GeneralRe: How can I check a folder to see if there is a specific file exist or not? Pin
StarMeteor23-Mar-04 8:18
StarMeteor23-Mar-04 8:18 
GeneralRe: How can I check a folder to see if there is a specific file exist or not? Pin
David Crow23-Mar-04 8:23
David Crow23-Mar-04 8:23 
GeneralRe: How can I check a folder to see if there is a specific file exist or not? Pin
StarMeteor23-Mar-04 18:36
StarMeteor23-Mar-04 18:36 
AnswerRe: How can I check a folder to see if there is a specific file exist or not? Pin
David Crow23-Mar-04 6:30
David Crow23-Mar-04 6:30 
GeneralC++ and serialization Pin
_psh_23-Mar-04 5:42
_psh_23-Mar-04 5:42 
GeneralRe: C++ and serialization Pin
Robert A. T. Káldy23-Mar-04 10:30
Robert A. T. Káldy23-Mar-04 10:30 
First: ar >> pFeature will read the pointer value, not the contents of object!
If you want to serialize objects of different types, you have to store a type information with each object, even it seems ugly to you. The stream is only a sequence of bytes, and you haven't any type information, unless you store it explicitly.
You should use the standard MFC serialization through CObject and CRuntimeClass, it is quite modular but IMHO non-elegant. And you must derive your objects from CObject, clearly.
Or you can write your own class factory. Class factory is an object, to that you pass an type ID, and the factory creates an instance of type described by the ID. For details see this article.

Robert-Antonio

"I launched Norton Commander and saw, drive C: on the left, drive C: on the
right...Damn, why I need two drives C:??? So I formatted one..."

GeneralRe: C++ and serialization Pin
_psh_23-Mar-04 21:48
_psh_23-Mar-04 21:48 
GeneralRe: C++ and serialization Pin
Ravi Bhavnani23-Mar-04 11:05
professionalRavi Bhavnani23-Mar-04 11:05 
GeneralRe: C++ and serialization Pin
_psh_23-Mar-04 23:10
_psh_23-Mar-04 23:10 
GeneralRe: C++ and serialization Pin
Ravi Bhavnani24-Mar-04 3:43
professionalRavi Bhavnani24-Mar-04 3:43 
GeneralRe: C++ and serialization Pin
_psh_24-Mar-04 3:53
_psh_24-Mar-04 3:53 
GeneralMixing C++ and C code - HELP Pin
Member 62566623-Mar-04 5:15
Member 62566623-Mar-04 5:15 
GeneralRe: Mixing C++ and C code - HELP Pin
Member 62566623-Mar-04 5:20
Member 62566623-Mar-04 5:20 
GeneralRe: Mixing C++ and C code - HELP Pin
Maximilien23-Mar-04 5:44
Maximilien23-Mar-04 5:44 
GeneralRe: Mixing C++ and C code - HELP Pin
Pedro Ruiz23-Mar-04 7:30
Pedro Ruiz23-Mar-04 7:30 
GeneralRe: Mixing C++ and C code - HELP Pin
Member 62566623-Mar-04 7:36
Member 62566623-Mar-04 7:36 
GeneralRe: Mixing C++ and C code - HELP Pin
Pedro Ruiz23-Mar-04 7:48
Pedro Ruiz23-Mar-04 7:48 
GeneralRe: Mixing C++ and C code - HELP Pin
Member 62566623-Mar-04 7:35
Member 62566623-Mar-04 7:35 
GeneralRe: Mixing C++ and C code - HELP Pin
John R. Shaw23-Mar-04 11:04
John R. Shaw23-Mar-04 11:04 
Generaldll not terminating correctly Pin
BlackDice23-Mar-04 5:10
BlackDice23-Mar-04 5:10 
GeneralRe: dll not terminating correctly Pin
Blake Miller24-Mar-04 5:54
Blake Miller24-Mar-04 5:54 
GeneralLoad an image Pin
rrrado23-Mar-04 5:09
rrrado23-Mar-04 5:09 
GeneralRe: Load an image Pin
Jörgen Sigvardsson23-Mar-04 5:22
Jörgen Sigvardsson23-Mar-04 5:22 

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.