Sat, 10/23/2004 - 11:25

Forums:

HI

How can I make a math_Matrix A(a,b,c,d) as a global variable and

then set the variables a, b, c and d.

Thanks for any response

Sat, 10/23/2004 - 11:25

Forums:

HI

How can I make a math_Matrix A(a,b,c,d) as a global variable and

then set the variables a, b, c and d.

Thanks for any response

Sun, 10/24/2004 - 22:34

By using a pointer, it should be ok.

math_Matrix* pMatrix=NULL;

#define myMatrix (*pMatrix)

void doSomething();

void main()

{

int a=1,b=4,c=1,d=4;

pMatrix=new math_Matrix(a,b,c,d);

doSomething();

delete pMatrix;

}

void doSomething()

{

(*pMatrix) *=2.0;

//or

myMatrix*=2.0;

}

Sun, 10/31/2004 - 12:49

Dear sir,

Thank you and sorry for late.

I use it,in OCC samples it works but it doesnt work on my new project and "pMatrix=new math_Matrix(a,b,c,d);" makes the following error:

error C2661: 'new' : no overloaded function takes 3 parameters

Error executing cl.exe.

Is there another definition need?

Tue, 11/02/2004 - 13:25

Hi Alex,

if you develop with VC try commenting out the following block:

#ifdef _DEBUG

#define new DEBUG_NEW

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

HTH,

Patrik