Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: serialized objects conversion question Pin
toxcct21-Aug-06 3:41
toxcct21-Aug-06 3:41 
GeneralRe: serialized objects conversion question Pin
Zac Howland21-Aug-06 3:45
Zac Howland21-Aug-06 3:45 
GeneralRe: serialized objects conversion question Pin
toxcct21-Aug-06 3:53
toxcct21-Aug-06 3:53 
GeneralRe: serialized objects conversion question Pin
Zac Howland21-Aug-06 4:10
Zac Howland21-Aug-06 4:10 
AnswerRe: serialized objects conversion question Pin
Ravi Bhavnani19-Aug-06 15:50
professionalRavi Bhavnani19-Aug-06 15:50 
GeneralRe: serialized objects conversion question Pin
toxcct20-Aug-06 21:27
toxcct20-Aug-06 21:27 
GeneralRe: serialized objects conversion question Pin
Ravi Bhavnani21-Aug-06 1:24
professionalRavi Bhavnani21-Aug-06 1:24 
GeneralRe: serialized objects conversion question Pin
toxcct21-Aug-06 2:15
toxcct21-Aug-06 2:15 
nope, i read perfectly the files ((de-)serializing is not the matter at all).

i only fail in having two definitions of a class (in two different files) in the same project...

take this as an illustration of my problem :

MyClassOld.h :
 
class CMyClassOld {
    //schema v1.0
  private:
    std::vector<CFoo> m_vecFooList;
    std::vector<CFoo2> m_vecFoo2List;
 
    //...
};

MyClass.h :
 
class CMyClass {
    //schema v2.0
  private:
    std::vector<CFoo> m_vecFooList;
    //m_vecFoo2List not existing anymore
 
    //...
};


what i want to do is this :
#include "MyClassOld.h"
#include "MyClass.h"
 
CMyClassOld o1;
CMyClass o2;
 
//reads a CMyClassOld serialized object into o1
 
//converts it to a CMyClass object (into o2)
 
//Serializes o2


the problems curretly is that i have to rename one of the class into SomethingOld to avoid the "type redefinition" compilation error...

see what i mean ?



TOXCCT >>> GEII power

[VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

GeneralRe: serialized objects conversion question Pin
Ravi Bhavnani21-Aug-06 2:26
professionalRavi Bhavnani21-Aug-06 2:26 
GeneralRe: serialized objects conversion question Pin
toxcct21-Aug-06 2:36
toxcct21-Aug-06 2:36 
GeneralRe: serialized objects conversion question Pin
Ravi Bhavnani21-Aug-06 3:17
professionalRavi Bhavnani21-Aug-06 3:17 
GeneralRe: serialized objects conversion question Pin
toxcct21-Aug-06 3:23
toxcct21-Aug-06 3:23 
GeneralRe: serialized objects conversion question Pin
Ravi Bhavnani21-Aug-06 3:32
professionalRavi Bhavnani21-Aug-06 3:32 
QuestionComboBox background problem in CPropertySheet wizard Pin
ewanb18-Aug-06 4:52
ewanb18-Aug-06 4:52 
Questionnot using the UNICODE libs in VS 2005 Pin
Kleser18-Aug-06 4:11
Kleser18-Aug-06 4:11 
QuestionConceptual Question Pin
LCI18-Aug-06 3:55
LCI18-Aug-06 3:55 
AnswerRe: Conceptual Question Pin
charlieg18-Aug-06 4:06
charlieg18-Aug-06 4:06 
AnswerRe: Conceptual Question Pin
Maximilien18-Aug-06 4:45
Maximilien18-Aug-06 4:45 
GeneralRe: Conceptual Question Pin
LCI18-Aug-06 5:13
LCI18-Aug-06 5:13 
GeneralRe: Conceptual Question Pin
BambooMoon18-Aug-06 6:10
BambooMoon18-Aug-06 6:10 
AnswerRe: Conceptual Question Pin
flippydeflippydebop21-Aug-06 12:12
flippydeflippydebop21-Aug-06 12:12 
QuestionWhy do some people use HeapAlloc instead of malloc? Pin
Chintoo72318-Aug-06 3:48
Chintoo72318-Aug-06 3:48 
AnswerRe: Why do some people use HeapAlloc instead of malloc? Pin
bob1697218-Aug-06 4:25
bob1697218-Aug-06 4:25 
AnswerRe: Why do some people use HeapAlloc instead of malloc? Pin
Andy Moore18-Aug-06 7:02
Andy Moore18-Aug-06 7:02 
GeneralRe: Why do some people use HeapAlloc instead of malloc? Pin
Chintoo72318-Aug-06 7:18
Chintoo72318-Aug-06 7:18 

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.