Hello
in C# : Partial type definitions allow the definition of a class, struct or
interface to be split into multiple files.
I'd like to have the equivalent keyword of partial in VC++
does someone has an idea?
Thanks in advance
Hendrik Schober - 17 Jun 2005 11:01 GMT
> Hello
> in C# : Partial type definitions allow the definition of a class, struct or
> interface to be split into multiple files.
> I'd like to have the equivalent keyword of partial in VC++
> does someone has an idea?
You can only split the definition of a class'
member functions over as many file as you
like. The class itself needs to be defined in
one piece.
> Thanks in advance
Schobi

Signature
SpamTrap@gmx.de is never read
I'm Schobi at suespammers dot org
"Coming back to where you started is not the same as never leaving"
Terry Pratchett
tlemcenvisit - 17 Jun 2005 12:02 GMT
I want an equivalent to "partial" keyword
Hendrik Schober - 17 Jun 2005 12:43 GMT
> I want an equivalent to "partial" keyword
Which I don't know.
Schobi

Signature
SpamTrap@gmx.de is never read
I'm Schobi at suespammers dot org
"Coming back to where you started is not the same as never leaving"
Terry Pratchett
Carl Daniel [VC++ MVP] - 17 Jun 2005 14:30 GMT
> Hello
> in C# : Partial type definitions allow the definition of a class,
> struct or interface to be split into multiple files.
> I'd like to have the equivalent keyword of partial in VC++
> does someone has an idea?
> Thanks in advance
There is no equivalent.
-cd
Gustavo L. Fabro - 21 Jun 2005 19:06 GMT
> Hello
> in C# : Partial type definitions allow the definition of a class, struct
[quoted text clipped - 3 lines]
> does someone has an idea?
> Thanks in advance
Hmmmm in what context would you like this? Meaning, why exactly
you want to split a class definition in multiple .h files?
You could always play with the preprocessor, I believe!
ClassX.h:
--------Cut here --------------
class X
{
public:
void f1();
void f2();
void f3();
#include "classX2.h"
--------Cut here --------------
ClassX2.h:
--------Cut here --------------
void f4();
void f5();
#include "classX3.h"
--------Cut here --------------
ClassX3.h:
--------Cut here --------------
private:
void f6();
int a,b,c;
}
--------Cut here --------------
But I don't easily see an advantage on doing this and wouldn't recommend it.
Fabro