banking system

What is the errors in void wid_det(), void dep_det() and in trans_det()?..
I only want to display all transactions there but its not appearing. i don't know what is the error for not displaying.
help me please.. thanks in advance :D

here's the code :
|
v
Last edited on
If that's your strategy, then nobody would even attend to you. What's so special in your piece of code that people can't see?
you misinterpret me..the code is too long for the maximum length of every post...
wait i'll cut the code half by half
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <dos.h>
#define m 2

int ctr=0;
int q=20;
struct acct_rec
{
	char acct_num[50];
	char ln[50];
	char fn[50];
	char mn[50];
	char acct_type1;
	char acct_stat;
	float in_bal;
}info[5];
struct trans_rec
{
	char trans_code;
	char acct_num[50];
	char trans_type[50];
	float amt;
}rec[100];
char user[20];
void login(void);
void new_acct();
void disp_acct();
void edit_acct();
void transac();
void disp_rep();
void mainmenu();
void welcome();
void acct_det();
void withdraw(int i);
void deposit(int i);
void inquire(int i);
void dep_det();
void wid_det();
void trans_det();
main()
{
	welcome();
	clrscr();
	getch();
	return 0;
}
void login()
{
	char pass[20]="", c;
	int i=0;
	textcolor(WHITE);
	textbackground(BLACK);
	clrscr();
	textcolor(WHITE);
	textbackground(BLUE);
	gotoxy(21,9); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
	gotoxy(21,10);cprintf("º   Username:                     º");
	gotoxy(21,11);cprintf("º   Password:                     º");
	gotoxy(21,12);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
	textcolor(9);
	gotoxy(35,10);gets(user);
	gotoxy(35,11);
	while((c=getch()) != 13)
	{
		pass[i++] = c;
		putchar('*');
	}
	if (strcmp(pass,"melbourne")==0)
	{
		clrscr();
		mainmenu();
	}
	else
	{
		textcolor(WHITE);
		textbackground(BLACK);
		clrscr();
		textcolor(WHITE);textbackground(BLUE);
		gotoxy(21,10);cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
		gotoxy(21,11);cprintf("º                                 º");
		gotoxy(21,12);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
		textcolor(RED+BLINK);
		gotoxy(31,11);cprintf("Invalid Password!");
		gotoxy(79,25);
		getch();
		login();
	}
}
void new_acct()
{
	int i;
	for(i=0;i<m;i++)
	{
		textcolor(0);textbackground(15);
		gotoxy(2,4); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
		gotoxy(2,5); cprintf("º                              ACCOUNT RECORD #%i                             º",i+1);
		gotoxy(2,6); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
		gotoxy(2,7); cprintf("º Account Number º                                                           º");
		gotoxy(2,8); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
		gotoxy(2,9); cprintf("º Last Name º                       º First Name º                           º");
		gotoxy(2,10);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÊÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
		gotoxy(2,11);cprintf("º Middle Name º                     º Account Type [1/2] º                   º");
		gotoxy(2,12);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍËÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
		gotoxy(2,13);cprintf("º Account Status [1/2] º        º Initial Balance º                          º");
		gotoxy(2,14);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
		//input
		gotoxy(21,7); cin>>info[i].acct_num;
		gotoxy(16,9); gets(info[i].ln);
		gotoxy(53,9); gets(info[i].fn);
		gotoxy(18,11);gets(info[i].mn);
		gotoxy(61,11);cin>>info[i].acct_type1;
		gotoxy(27,13);cin>>info[i].acct_stat;
		gotoxy(54,13);cin>>info[i].in_bal;
	      //	gotoxy(31,16);cprintf("Loading.....");
	      //	gotoxy(31,17);cprintf("Press any key to continue..");
	      //	delay(1000);
	}
}
void disp_acct()
{
	int i,isfound=0;
	char u[20];
	gotoxy(2,4);cout<<"Enter account number to be view: ";
	gotoxy;(2,5);cin>>u;
	for(i=0;i<m;i++)
	{
		if(strcmp(u,info[i].acct_num)==0)
		{
			gotoxy(2,6);cout<<"Account Record #"<<i+1;
			gotoxy(2,7);cout<<"Your Account Number is: "<<info[i].acct_num;
			gotoxy(2,8);cout<<"Your Account Name is: "<<info[i].fn<<" "<<info[i].mn<<" "<<info[i].ln;
			gotoxy(2,9);cout<<"Your Account Type is: ";
			if(info[i].acct_type1== '1')
				cout<<" SAVINGS ACCOUNT";
			else if(info[i].acct_type1== '2')
				cout<<" CHECKING ACCOUNT";
			else
				cout<<" UNDEFINED";
			gotoxy(2,10);cout<<"Your Account Status is: ";
			if(info[i].acct_stat== '1')
				cout<<" ACTIVE";
			else if(info[i].acct_stat== '2')
				cout<<" ACTIVE";
			else
				cout<<" UNDEFINED";
			gotoxy(2,11);
			cout<<"Your Initial Balance is: "<<info[i].in_bal;
			isfound=1;
			break;
		}
	}	if(isfound!=1)
		{
			gotoxy(2,5);cout<<"Account Number is not Exist!";
			gotoxy(2,6);cout<<"Press any key to go back to mainmenu...";
			getch();
			mainmenu();
		}

}
void edit_acct()
{
	int i, isfound=0;
	char acct_num1[50], choice;
	textcolor(0);textbackground(15);
	gotoxy(2,4);cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
	gotoxy(2,5);cprintf("º Enter Account Number to be Edit:      º");
	gotoxy(2,6);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
	gotoxy(36,5);cin>>acct_num1;
	for(i=0;i<m;i++)
	{
		if(strcmp(acct_num1,info[i].acct_num)==0)
		{
			gotoxy(2,7); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
			gotoxy(2,8); cprintf("º Last Name º                           º");
			gotoxy(2,9); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
			gotoxy(2,10);cprintf("º First Nameº                           º");
			gotoxy(2,11);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
			gotoxy(2,12);cprintf("ºMiddle Nameº                           º");
			gotoxy(2,13);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
			gotoxy(15,8);cprintf("%s",info[i].ln);
			gotoxy(15,10);cprintf("%s",info[i].fn);
			gotoxy(15,12);cprintf("%s",info[i].mn);

			clrscr();
			gotoxy(2,2)/*14*/;cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
			gotoxy(2,3); cprintf("º     E D I T    M E N U     º");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
			gotoxy(2,5); cprintf("º [L] :     Last Name        º");
			gotoxy(2,6); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
			gotoxy(2,7); cprintf("º [F] :     First Name       º");
			gotoxy(2,8); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹") ;
			gotoxy(2,9); cprintf("º [M] :     Middle Name      º");
			gotoxy(2,10);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹")  ;
			gotoxy(2,11);cprintf("º [W] :     Whole Name       º");
			gotoxy(2,12);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹")  ;
			gotoxy(2,12);cprintf("º Enter your choice:         º");
			gotoxy(2,14);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ")   ;
			emenu:
			choice=getch();
			switch(choice)
			{
				case 'L':
				case 'l':
					gotoxy(2,20);cout<<"Enter New Last Name: ";
					gets(info[i].ln);
					gotoxy(2,21);cout<<"Loading...";
					delay(1500);
					gotoxy(2,22);cout<<"Press any key to continue...";
					getch();
					mainmenu();
				case 'F':
				case 'f':
					gotoxy(2,12);cout<<"Enter New First Name:";
					gets(info[i].fn);
					gotoxy(2,14);cout<<"Loading...";
					delay(1500);
					gotoxy(2,15);cout<<"Press any key to continue...";
					getch();
					mainmenu();
				case 'M':
				case 'm':
					gotoxy(2,12);cout<<"Enter New Middle Name: ";
					gets(info[i].mn);
					gotoxy(2,14);cout<<"Loading...";
					delay(1500);
					gotoxy(2,15);cout<<"Press any key to continue...";
					getch();
					mainmenu();
				case 'W':
				case 'w':
					gotoxy(2,12);cout<<"Enter New Last Name: ";
					gets(info[i].ln);
					gotoxy(2,13);cout<<"Enter New First Name: ";
					gets(info[i].fn);
					gotoxy(2,14);cout<<"Enter New Middle Name: ";
					gets(info[i].mn);
					cout<<"Loading...";
					delay(1500);
					cout<<"Press any key to continue...";
					getch();
					mainmenu();
				default:
					textcolor(RED+BLINK);
					gotoxy(2,26);cprintf("      Invalid Input!!!     ");
					getch();
					goto emenu;
		}
	 //	isfound=1;
	 //	break;
		}

	 }
	 if(isfound!=1)
		{
			cout<<"\n Account Number is not FOUND!";
			getch();
			mainmenu();
		}
}
void transac()
{
	char acct1[50];
	int i,isfound=0;
	char choice;
	clrscr();
	gotoxy(21,9); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
	gotoxy(21,10);cprintf("º Enter Account Number:                º");
	gotoxy(21,11);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
	gotoxy(44,10);cin>>acct1;
	for(i=0;i<m;i++)
	{
		if (strcmp(acct1,info[i].acct_num)==0)
		{
			gotoxy(2,14);cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
			gotoxy(2,15);cprintf("º T R A N S A C T I O N  M E N U º");
			gotoxy(2,16);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
			gotoxy(2,17);cprintf("º [W] :     Withdraw             º");
			gotoxy(2,18);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
			gotoxy(2,19);cprintf("º [D] :     Deposit              º");
			gotoxy(2,20);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹") ;
			gotoxy(2,21);cprintf("º [I] :     Inquire Balance      º");
			gotoxy(2,22);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹")  ;
			gotoxy(2,23);cprintf("º Enter your choice:             º");
			gotoxy(2,24);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
			isfound=1;
			break;
		}
	}
	if(isfound!=1)
		{
		gotoxy(25,16);cout<<"Account Number is NOT FOUND!";
		getch();
		mainmenu();
		}
	tmenu:
			choice=getch();
			switch(choice)
			{
				case 'W':
				case 'w':
					withdraw(i);
					ctr++;
					getch();
					mainmenu();
				case 'D':
				case 'd':
					deposit(i);
					ctr++;
			  //getch();
					mainmenu();
				case 'I':
				case 'i':
					inquire(i);
					mainmenu();
				default:
					textcolor(RED+BLINK);
					gotoxy(2,26);cprintf("      Invalid Input!!!     ");
					getch();
					goto tmenu;
	}

//				mainmenu();

}
void disp_rep()
{
	char choice;
	gotoxy(24,7); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
	gotoxy(24,8); cprintf("º    DISPLAY REPORT MENU      º");
	gotoxy(24,9); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
	gotoxy(24,10);cprintf("º [A] :   ACCOUNT DETAILS     º");
	gotoxy(24,11);cprintf("º [T] :   TRANSACTION DETAILS º");
	gotoxy(24,12);cprintf("º [W] :   WITHDRAWALS         º");
	gotoxy(24,13);cprintf("º [D] :   DEPOSITS            º");
	gotoxy(24,14);cprintf("º [M] :   MAINMENU            º");
	gotoxy(24,15);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
	gotoxy(24,16);cprintf("º Enter your choice:          º");
	gotoxy(24,17);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
	textcolor(RED);
	gotoxy(45,16);
	drmenu:
	choice=getch();
	switch(choice)
	{
		case 'A':
		case 'a':
			 acct_det();
			 getch();
			 mainmenu();
		case 'T':
		case 't':
			 trans_det();
			 getch();
			 mainmenu();
		case 'W':
		case 'w':
			 wid_det();
			 getch();
			 mainmenu();
		case 'D':
		case 'd':
			 dep_det();
			 getch();
			 mainmenu();
		default:
			textcolor(RED+BLINK);
			gotoxy(25,16);cprintf("      Invalid Input!!!     ");
			getch();
			goto drmenu;
       //			break;
	}
}
void acct_det()
{
	textcolor(WHITE);textbackground(BLACK);
	int i=0;
	clrscr();
	for(i=0;i<m;i++)
	{
		gotoxy(2,1);cprintf("First Name");
		gotoxy(2,2+i);cprintf("%s",info[i].fn);
		gotoxy(30,1);cprintf("Middle Name");
		gotoxy(30,2+i);cprintf("%s",info[i].mn);
		gotoxy(50,1);cprintf("Last Name");
		gotoxy(50,2+i);cprintf("%s",info[i].ln);
	}
}
void withdraw(int i)
{
	clrscr();
	float wid;
	cout<<"Enter amount to withdraw: P";
	cin>>wid;
	if(wid<=info[i].in_bal)
	{
		info[i].in_bal-=wid;
		rec[i].trans_code=ctr;
		strcpy(rec[i].acct_num,info[i].acct_num);
		strcpy(rec[i].trans_type, "Withdrawal");
		cout<<"\nWithdraw Successful!!\nPress any key to continue!";
		getch();
		}
	else
	{
		cout<<"Your withdrawal amount is bigger than your current balance";
		getch();
	}
}
void trans_det()
{
	textcolor(WHITE);textbackground(BLACK);
	int j;
	clrscr();
	for(j=0;j<ctr;j++)
	{
		gotoxy(2,1);printf("Account Number");
		gotoxy(2,2+j);cprintf("%s",rec[j].acct_num);
		gotoxy(30,1);cprintf("Transaction Type");
		gotoxy(30,2+j);cprintf("%s",rec[j].trans_type);
		gotoxy(50,1);cprintf("Amount");
		gotoxy(50,2+j);cprintf("%.2f",rec[j].amt);
	}
}
void wid_det()
{
	textcolor(WHITE);textbackground(BLACK);


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
	int i=0,k=0;
	clrscr();
	for(i=0;i<ctr;i++)
	{
		gotoxy(2,1);printf("Account Number");
		gotoxy(2,2+i);cprintf("%s",rec[i].acct_num);
		gotoxy(30,1);cprintf("Transaction Type");
		if (strcmpi(rec[i].trans_type,"Withdrawal")==0)
		       {
				gotoxy(30,2+i);
				cprintf("%s",rec[i].trans_type);
				k++;
		       }
	}
}
void dep_det()
{
	textcolor(WHITE);textbackground(BLACK);
	int i=0,t=0,k=0;
	clrscr();
	for(i=0;i<ctr;i++)
	{
		gotoxy(2,1);printf("Account Number");
		gotoxy(2,2+i);cprintf("%s",rec[i].acct_num);
		gotoxy(30,1);cprintf("Transaction Type");
		if (strcmpi(rec[i].trans_type,"Deposit")==0)
		       {
				gotoxy(30,2+i);
				cprintf("%s",rec[i].trans_type);
				k++;
		       }
	}
}
void deposit(int i)
{
	float dep;
	int t=0;
	clrscr();
	cout<<"Enter amount to be deposit: P";
	cin>>dep;
	info[i].in_bal+=dep;
	printf("Current balance P%.2f",info[i].in_bal);
	rec[t].trans_code=t+1;
	strcpy(rec[t].acct_num,info[i].acct_num);
	strcpy(rec[i].trans_type, "Deposit");
	rec[t].amt=dep;
	getch();
}
void inquire(int i)
{
	//int i=0;
	clrscr();
	printf("Current Balance %.2f",info[i].in_bal);
	getch();
}
void mainmenu()
{
	char choice,ans;
	textcolor(WHITE);
	textbackground(BLUE);
	clrscr();
	textcolor(0);
	textbackground(7);
	gotoxy(1,1);cprintf("                                BANCO DE PENINSULARES                           ");
	gotoxy(1,25);cprintf("Teller in charge: %s",user);
	gotoxy(24,7); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
	gotoxy(24,8); cprintf("º M  A   I  N   M   E   N   U º");
	gotoxy(24,9); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
	gotoxy(24,10);cprintf("º [A] :    ACCOUNT            º");
	gotoxy(24,11);cprintf("º [T] :    TRANSACTION        º");
	gotoxy(24,12);cprintf("º [D] :    DISPLAY REPORT     º");
	gotoxy(24,13);cprintf("º                             º");
	gotoxy(24,14);cprintf("º [X] :    EXIT               º");
	gotoxy(24,15);cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
	gotoxy(24,16);cprintf("º Enter your choice:          º");
	gotoxy(24,17);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
	textcolor(RED);
	gotoxy(45,16);
	choice=getch();
	switch(choice)
	{
		case 'A':
		case 'a':
			{
				clrscr();
				textcolor(WHITE);textbackground(BLUE);
				gotoxy(1,1); cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
				gotoxy(1,2); cprintf("º     [N]ew Account        º      [V]iew Account        º    [E]dit Account    º");
				gotoxy(1,3); cprintf("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹");
				gotoxy(1,4); cprintf("º                                                                              º");
				gotoxy(1,5); cprintf("º                                                                              º");
				gotoxy(1,6); cprintf("º                                                                              º");
				gotoxy(1,7); cprintf("º                                                                              º");
				gotoxy(1,8); cprintf("º                                                                              º");
				gotoxy(1,9); cprintf("º                                                                              º");
				gotoxy(1,10);cprintf("º                                                                              º");
				gotoxy(1,11);cprintf("º                                                                              º");
				gotoxy(1,12);cprintf("º                                                                              º");
				gotoxy(1,13);cprintf("º                                                                              º");
				gotoxy(1,14);cprintf("º                                                                              º");
				gotoxy(1,15);cprintf("º                                                                              º");
				gotoxy(1,16);cprintf("º                                                                              º");
				gotoxy(1,17);cprintf("º                                                                              º");
				gotoxy(1,18);cprintf("º                                                                              º");
				gotoxy(1,19);cprintf("º                                                                              º");
				gotoxy(1,20);cprintf("º                                                                              º");
				gotoxy(1,21);cprintf("º                                                                              º");
				gotoxy(1,22);cprintf("º                                                                              º");
				gotoxy(1,23);cprintf("º                                                                              º");
				gotoxy(1,24);cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
				top:
				choice=getch();
				switch(choice)
				{
					case 'N':
					case 'n':
						new_acct();
						mainmenu();
					case 'V':
					case 'v':
						disp_acct();
						getch();
						mainmenu();
					case 'E':
					case 'e':
						edit_acct();
						getch();
						mainmenu();
					default:
						textbackground(BLACK);
						textcolor(RED+BLINK);
						gotoxy(28,10);cprintf("      Invalid Input!!!     ");
						gotoxy(28,12);printf("PRESS ANY KEY TO CONTINUE!");
						getch();
						mainmenu();
				}//break;
		case 'T':
		case 't':
			transac();
			mainmenu();
			}
		case 'D':
		case 'd':
			disp_rep();
			mainmenu();
		case 'X':
		case 'x':
			textcolor(RED+BLINK);
			gotoxy(26,16);cprintf("Are you sure? [Y/N]: ");
			ans=getch();
			if (ans=='Y'||ans=='y')
				exit(1);
			else if (ans=='N'|| ans== 'n')
				mainmenu();
			else
			{
				textcolor(RED+BLINK);
				gotoxy(26,16);cprintf("     Invalid Input!!!     ");
				getch();
				mainmenu();
			}
			break;
		default:
			textcolor(RED+BLINK);
			gotoxy(26,16);cprintf("      Invalid Input!!!     ");
			getch();
			mainmenu();
			break;
	}
}
void welcome()
{
	textcolor(WHITE);
	textbackground(BLACK);
	clrscr();
	_setcursortype(_NOCURSOR);
	textbackground(BLACK);
	textcolor(BLUE);
     //	delay(1000);
	gotoxy(15,6); cprintf("ÛÛÛÛÛÛÛÛÛÛÛ        ÛÛÛÛÛÛÛÛÛÛ          ÛÛÛÛÛÛÛÛÛÛ");
      //	delay(1000);
	gotoxy(15,7); cprintf("ÛÛÛ       ÛÛ       ÛÛÛ      ÛÛÛ        ÛÛÛ     ÛÛÛÛ");
	//delay(1000);
	gotoxy(15,8); cprintf("ÛÛÛ        ÛÛÛ     ÛÛÛ       ÛÛÛÛ      ÛÛÛ      ÛÛÛÛ");
	//delay(1000);
	gotoxy(15,9); cprintf("ÛÛÛ        ÛÛÛ     ÛÛÛ        ÛÛÛÛ     ÛÛÛ      ÛÛÛÛ");
	//delay(1000);
	gotoxy(15,10);cprintf("ÛÛÛ       ÛÛÛÛ     ÛÛÛ         ÛÛÛÛ    ÛÛÛ     ÛÛÛÛ");
	//delay(1000);
	gotoxy(15,11);cprintf("ÛÛÛÛÛÛÛÛÛÛÛÛÛ      ÛÛÛ         ÛÛÛÛ    ÛÛÛÛÛÛÛÛÛÛ");
	//delay(1000);
	gotoxy(15,12);cprintf("ÛÛÛ       ÛÛÛÛ     ÛÛÛ         ÛÛÛÛ    ÛÛÛ");
	//delay(1000);
	gotoxy(15,13);cprintf("ÛÛÛ        ÛÛÛ     ÛÛÛ        ÛÛÛÛ     ÛÛÛ");
	//delay(1000);
	gotoxy(15,14);cprintf("ÛÛÛ        ÛÛÛ     ÛÛÛ       ÛÛÛÛ      ÛÛÛ");
	//delay(1000);
	gotoxy(15,15);cprintf("ÛÛÛ       ÛÛ       ÛÛÛ      ÛÛÛÛ       ÛÛÛ");
       //	delay(1000);
	gotoxy(15,16);cprintf("ÛÛÛÛÛÛÛÛÛÛÛ        ÛÛÛÛÛÛÛÛÛÛ          ÛÛÛ");
	textcolor(WHITE);
	textbackground(BLUE);
       //	delay(1000);
	gotoxy(29,18);cprintf(" Banco De Peninsulares ");
	//delay(1000);
	gotoxy(29,19);cprintf("  MINI BANKING SYSTEM  ");
	delay(1000);
	gotoxy(27,21);cprintf("Press any key to continue.....");
	getch();
	login();
}
that's the whole code of the banking system.. soryy for misinterpretting my post.

please help me to solve my problem... thanks :D
Better yet, post the actual error instead all this ugly code. If you have the chance, create a proper GUI for this program and keep it separate from the logic.
Topic archived. No new replies allowed.