You can't give a parameter the same name as a member variable like that without confusion. The compiler doesn't know which "balance" you're referring to.
Alter it so that when you're referring to the member variable, you use the this-> prefix.
In situations where there is less logic in the constructor, don't forget that you can use initialisation lists. One of the advantages of this is that the compiler can distinguish between similarly named variables, so you don't need the this keyword.
Generally speaking, I don't think you want such logic in the constructor. It's for the creation of the object. In this case, I'd consider it for initialising any members and not much else.
1. you do not need to have these three variables in the class level,
int credit;
int balance;
int total;
2. do not forget to initialize any variables, if you are using an old compiler.