Файл заголовка должен иметь параметры по умолчанию, а cpp не должен.
test.h:
class Test
{
public:
Test(int a, int b = 0);
int m_a, m_b;
}
test.cpp:
Test::Test(int a, int b)
: m_a(a), m_b(b)
{
}
main.cpp:
#include "test.h"
int main(int argc, char**argv)
{
Test t1(3, 0);
Test t2(3);
//....t1 and t2 are the same....
return 0;
}