![]() |
Conversion Operator Problem
Hello all expert C++ programmer, i truly new to C++ programming.
I have a exercise where need to calculate the monthly interest with the balance supplied. Header File: Code:
#pragma onceCode:
#include<iostream>Error Message : Quote:
Thanks for your help. Your help is greatly appreciated by me and others. |
Re: Conversion Operator Problem
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
|
Re: Conversion Operator Problem
I have set the one of the constructor explicit where to enhance one argument is been supplied.
|
Re: Conversion Operator Problem
Quote:
|
Re: Conversion Operator Problem
What is the reason of having explicit constructor?
Where is the defintion of constructor corresponding to Code:
savingAccount peter(2000); |
Re: Conversion Operator Problem
No definition for Single argument constructor in ur program
If u want a simple solution means add the following line to ur header file savingAccount(double balance):balance(balance){} so that u got an answer........... |
| All times are GMT +5.5. The time now is 01:19. |