B
Bob Altman
This question deals with unmanaged C++ (Visual Studio 2005).
Suppose I have a class named MyClass with a constructor that takes an
argument. How do I create an instance of type MyClass as a member variable
(see below)?
Class Test
{
public:
Test(void); // Constructor
~Test(void); // Destructor
private:
MyClass m_myClass("My argument"); // error C2059; syntax error :
'constant'
};
TIA - Bob
Suppose I have a class named MyClass with a constructor that takes an
argument. How do I create an instance of type MyClass as a member variable
(see below)?
Class Test
{
public:
Test(void); // Constructor
~Test(void); // Destructor
private:
MyClass m_myClass("My argument"); // error C2059; syntax error :
'constant'
};
TIA - Bob