N
Neviton
Help with this error ! Please !
The code below is simplified, because I'm trying to solve this error.
....MyClass.cpp In member function `void MyClass::Initialize()':
....MyClass.cpp aggregate value used where an integer was expected
....Makefile.win [Build Error] [MyClass.o] Error 1
The code:
/* MyClass.h *****************/
class MyClass
{
public:
void Initialize();
void MyFunction();
};
/* MyClass.cpp **************/
#include "MyClass.h"
void MyClass::Initialize()
{
long address = (long)MyFunction; //this line rises the error
}
void MyClass::MyFunction()
{
//empty
}
The code below is simplified, because I'm trying to solve this error.
....MyClass.cpp In member function `void MyClass::Initialize()':
....MyClass.cpp aggregate value used where an integer was expected
....Makefile.win [Build Error] [MyClass.o] Error 1
The code:
/* MyClass.h *****************/
class MyClass
{
public:
void Initialize();
void MyFunction();
};
/* MyClass.cpp **************/
#include "MyClass.h"
void MyClass::Initialize()
{
long address = (long)MyFunction; //this line rises the error
}
void MyClass::MyFunction()
{
//empty
}