Thanks laserlight,
I have compiled it. The compile error and my code are listed below.
But I do not understand what does the compile error mean -- " error C2082: redefinition of formal parameter 'param2'" and "error C2512: 'Test' : no appropriate default constructor available"?
Code:
class Test {
private:
bool active;
public:
Test (bool param2) : active (param2)
{
// do something
}
Test(bool param1, bool param2)
{
// set and manipulate param1
// call constructor with a single bool input parameter
Test (param2);
}
};
1>d:\visual studio 2008\projects\test_20080324\test_20080324\main2.cp p(17) : error C2082: redefinition of formal parameter 'param2'
1>d:\visual studio 2008\projects\test_20080324\test_20080324\main2.cp p(17) : error C2512: 'Test' : no appropriate default constructor available
Originally Posted by
laserlight
Instead of showing "pseudo code", write what you think is the real code, and attempt to compile it.
regards,
George