hi.. i'm having trouble with my project.. i keep getting "Unhandled Exception"
# include <conio.h>
# include <stdio.h>
class bank
{
float x;
public:
void deposit();
void withdraw();
void disp_det();
};
void bank::deposit()
{
float more;
printf(" enter the amount to deposit: ");
scanf("%f", more);
x += more;
}
void bank::withdraw()
{
float amt;
printf(" enter the amount to withdraw: ");
scanf("%f", amt);
x -= amt;
}
void bank::disp_det()
{
printf(" Account details");
printf(" Balance: P%f", x);
}
void main(void)
{
clrscr();
bank obj;
int choice =1;
while (choice != 0 )
{
printf(" Enter 1. Deposit \n 2. Withdraw \n 3. See A/c Status");
switch(choice)
{
case 1: obj.deposit();
break;
case 2 : obj.withdraw();
break;
case 3: obj.disp_det();
break;
}
}
getch();
}
can anyone tell me what i'm doing wrong..? ..and i can't use isotream.h