You may declare the constructor the following way
Class A
{
public:
A(); //default constructor
A( int a, string b);
private:
int a;string b;
};
According to the C++ Standard
In a function declaration, or in any function declarator except the declarator of a function definition (8.4), names of parameters (if supplied) have function prototype scope, which terminates at the end of the nearest enclosing function declarator
So member function parameters may have the same names as private data members of the class. Also you could define the constructor the following way
A::A( int a, string b) : a( a ), b( b ) {}
or
A::A( int a, string b){ A::a = a; A::b = b; }
or
A::A( int a, string b){ this->a = a; this->b = b; }