I cannot understand what you are trying to do. I don't see any one parameter constructor for your class savingAccount but your error suggest it has one with a const parameter. If thats the case convert your int parameter into const int