It seems that you do not understand what
typedef
is...
When you write the line
typedef type new_type
you are actually create an alias for type...It is very useful to create shorthand for long type names...
typedef unsigned long ulong
In your case you try to assign the very same alias to more than one types - that's impossible as the compiler will not able to decide what type you actually meant...
If I understand you question, what you actually try to do is to separate functionality of one class into two classes, but do not want to change the existing calls...
What I would advise is to create
cxclass1
and
cxclass2
and then change
cxclass
to inherit both...With this your exiting calls will still go to
cxclass
, but actually execute
cxclass1
or
cxclass2
...New code can access the new classes directly...
An example...
...before
class cxclass {
public:
DoSome() {}
DoOther() {}
}
...after
class cxclass1 {
public:
DoSome() {}
}
class cxclass2 {
public:
DoOther() {}
}
class cxclass : public cxclass1, public cxclass2 {
}