new class howto?
newbie
newbie at nospam.com
Tue Jul 31 04:23:57 PDT 2007
hi,
why is it that one can not create a class with the following:
module A
extern (Windows):
uint P_Start(char * pParam);
void P_Stop();
module A
import A;
class XXX {
public:
this() {}
uint start(char *yy) {
return P_Start(yy);
}
void start(char *yy) {
P_Stop();
}
}
module C
XXX tester = new XXX();
it will always generate an error during compilation:
non-constant expression
when i try to do that in a function, then i will get an exception.
More information about the Digitalmars-d-learn
mailing list