new class howto?

newbie newbie at
Tue Jul 31 04:23:57 PDT 2007


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 {
  this() {}
  uint start(char *yy) {
    return  P_Start(yy);
  void start(char *yy) {

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