The name of the class is reserved in C++ for constructors. You can create a constructor with parameters of the type you need, but it will always be creating a new instance of the class.
If you need to perform some task that is not instantiating the class, create a method using a different name.
class A {
...
public:
A(); // Constructor with no parameters
A(BarType bar); // Constructor with parameter BarType
void someMethod(BarType bar); // Method that takes bar and performs some operation
}
Usage:
BarType bar = BarType();
A aInstance = A(bar);
To perform some task without instantiating with parameters:
A aInstance = A();
BarType bar = BarType();
aInstance.someMethod(bar);