I'm trying to pass two arguments to a constructor:
class CTest1
{
public:
CTest1(const int i8BitImageID, const int i256BitImageID) : m_i8BitImageID(i8BitImageID), m_i256BitImageID(i256BitImageID) {};
private:
int m_i8BitImageID;
int m_i256BitImageID;
};
#define BITMAP_1_ID 1
#define BITMAP_2_ID 2
class CTest2
{
public:
CTest1 test1(BITMAP_1_ID, BITMAP_2_ID); // Compile error here
};
When I compile this (using Visual Studio 2017), the line where I declare "test1" results in a "C2059: syntax error: 'constant'" error. I've tried with an without "const" in the definition of the constructor.
Thanks!