亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? a project of bank.cpp

?? For about Banking system. I copy from CodeProject.com.
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	float t_balance ;
	while (file.read((char *) this, sizeof(initial)))
	{
		if (accno == t_accno)
		{
			t_balance = balance ;
			break ;
		}
	}
	file.close() ;
	return t_balance ;
}


//**********************************************************
// THIS FUNCTION RETURN 1 IF THE GIVEN ACCOUNT NO. FOUND
// IN THE FILE INITIAL.DAT
//**********************************************************

int initial :: found_account(int t_accno)
{
	fstream file ;
	file.open("INITIAL.DAT", ios::in) ;
	file.seekg(0,ios::beg) ;
	int found=0 ;
	while (file.read((char *) this, sizeof(initial)))
	{
		if (accno == t_accno)
		{
			found = 1 ;
			break ;
		}
	}
	file.close() ;
	return found ;
}


//**********************************************************
// THIS FUNCTION DRAWS THE BOX FOR THE LIST OF ACCOUNTS
//**********************************************************

void initial :: box_for_list()
{
	shape s ;
	s.box(2,1,79,25,218) ;
	s.line_hor(3,78,3,196) ;
	s.line_hor(3,78,5,196) ;
	s.line_hor(3,78,23,196) ;
	textbackground(WHITE) ;
	gotoxy(3,4) ;
	for (int i=1; i<=76; i++) cprintf(" ") ;
	textbackground(BLACK) ;
	textcolor(RED) ; textbackground(WHITE) ;
	gotoxy(4,4) ;
	cprintf("ACCOUNT NO.          NAME OF PERSON                  BALANCE") ;
	textcolor(YELLOW) ; textbackground(BLACK) ;
	int d1, m1, y1 ;
	struct date d;
	getdate(&d);
	d1 = d.da_day ;
	m1 = d.da_mon ;
	y1 = d.da_year ;
	gotoxy(4,2) ;
	cout <<"Date: " <<d1 <<"/" <<m1 <<"/" <<y1 ;
}


//**********************************************************
// THIS FUNCTION DISPLAYS THE LIST OF ACCOUNTS IN FILE
// INITIAL.DAT
//**********************************************************

void initial :: display_list(void)
{
	clrscr() ;
	box_for_list() ;
	int row=6, flag ;
	fstream file ;
	file.open("INITIAL.DAT", ios::in) ;
	while (file.read((char *) this, sizeof(initial)))
	{
		flag = 0 ;
		delay(10) ;
		gotoxy(7,row) ;
		cout <<accno ;
		gotoxy(25,row) ;
		cout <<name ;
		gotoxy(57,row) ;
		cout <<balance ;
		row++ ;
		if (row == 23)
		{
			flag = 1 ;
			row = 6 ;
			gotoxy(4,24) ;
			cout <<"Press any key to continue..." ;
			getch() ;
			clrscr() ;
			box_for_list() ;
		}
	}
	file.close() ;
	if (!flag)
	{
		gotoxy(4,24) ;
		cout <<"Press any key to continue..." ;
		getch() ;
	}
}


//**********************************************************
// THIS FUNCTION ADDS THE GIVEN DATA INTO THE FILE
// INITIAL.DAT
//**********************************************************

void initial :: add_to_file(int t_accno, char t_name[30], char t_address[60], float t_balance)
{
	accno = t_accno ;
	strcpy(name,t_name) ;
	strcpy(address,t_address) ;
	balance = t_balance ;
	fstream file ;
	file.open("INITIAL.DAT", ios::out | ios::app) ;
	file.write((char *) this, sizeof(initial)) ;
	file.close() ;
}


//**********************************************************
// THIS FUNCTION DELETES RECORD FOR THE GIVEN ACOUNT NO.
// FROM THE FILE INITIAL.DAT
//**********************************************************

void initial :: delete_account(int t_accno)
{
	fstream file ;
	file.open("INITIAL.DAT", ios::in) ;
	fstream temp ;
	temp.open("temp.dat", ios::out) ;
	file.seekg(0,ios::beg) ;
	while ( !file.eof() )
	{
		file.read((char *) this, sizeof(initial)) ;
		if ( file.eof() )
			break ;
		if ( accno != t_accno )
			temp.write((char *) this, sizeof(initial)) ;
	}
	file.close() ;
	temp.close() ;
	file.open("INITIAL.DAT", ios::out) ;
	temp.open("temp.dat", ios::in) ;
	temp.seekg(0,ios::beg) ;
	while ( !temp.eof() )
	{
		temp.read((char *) this, sizeof(initial)) ;
		if ( temp.eof() )
			break ;
		file.write((char *) this, sizeof(initial)) ;
	}
	file.close() ;
	temp.close() ;
}


//**********************************************************
// THIS FUNCTION UPDATE BALANCE FOR THE GIVEN ACOUNT NO.
// IN THE FILE INITIAL.DAT
//**********************************************************

void initial :: update_balance(int t_accno, float t_balance)
{
	int recno ;
	recno = recordno(t_accno) ;
	fstream file ;
	file.open("INITIAL.DAT", ios::out | ios::ate) ;
	balance = t_balance ;
	int location ;
	location = (recno-1) * sizeof(initial) ;
	file.seekp(location) ;
	file.write((char *) this, sizeof(initial)) ;
	file.close() ;
}


//**********************************************************
// THIS FUNCTION MODIFIES THE RECORD FOR THE GIVEN DATA
// IN THE FILE INITIAL.DAT
//**********************************************************

void initial :: modify_account(int t_accno, char t_name[30], char t_address[60])
{
	int recno ;
	recno = recordno(t_accno) ;
	fstream file ;
	file.open("INITIAL.DAT", ios::out | ios::ate) ;
	strcpy(name,t_name) ;
	strcpy(address,t_address) ;
	int location ;
	location = (recno-1) * sizeof(initial) ;
	file.seekp(location) ;
	file.write((char *) this, sizeof(initial)) ;
	file.close() ;
}


//**********************************************************
// THIS FUNCTION GIVE THE DATA TO MODIFY THE RECORD IN THE
// FILE INITIAL.DAT
//**********************************************************

void initial :: modify(void)
{
	clrscr() ;
	char t_acc[10] ;
	int t, t_accno ;
	gotoxy(71,1) ;
	cout <<"<0>=Exit" ;
	gotoxy(5,5) ;
	cout <<"Enter the account no. " ;
	gets(t_acc) ;
	t = atoi(t_acc) ;
	t_accno = t ;
	if (t_accno == 0)
		return ;
	clrscr() ;
	if (!found_account(t_accno))
	{
		gotoxy(5,5) ;
		cout <<"\7Account not found" ;
		getch() ;
		return ;
	}
	shape s ;
	s.box(2,2,79,24,218) ;
	s.line_hor(3,78,4,196) ;
	s.line_hor(3,78,22,196) ;
	gotoxy(71,1) ;
	cout <<"<0>=Exit" ;
	textbackground(BLUE) ;
	gotoxy(3,3) ;
	for (int i=1; i<=76; i++) cprintf(" ") ;
	textbackground(BLACK) ;
	textcolor(RED+BLINK) ; textbackground(BLUE) ;
	gotoxy(30,3) ;
	cprintf("MODIFY ACCOUNT SCREEN") ;
	textcolor(YELLOW) ; textbackground(BLACK) ;
	int d1, m1, y1 ;
	struct date d;
	getdate(&d);
	d1 = d.da_day ;
	m1 = d.da_mon ;
	y1 = d.da_year ;
	gotoxy(62,5) ;
	cout <<"Date: "<<d1 <<"/" <<m1 <<"/" <<y1 ;
	char ch ;
	display(t_accno) ;
	account a ;
	do
	{
		a.clear(5,13) ;
		gotoxy(5,13) ;
		cout <<"Modify this account (y/n): " ;
		ch = getche() ;
		if (ch == '0')
			return ;
		ch = toupper(ch) ;
	} while (ch != 'N' && ch != 'Y') ;
	if (ch == 'N')
		return ;
	int modified=0, valid ;
	char t_name[30], t_address[60] ;
	gotoxy(5,15) ;
	cout <<"Name    : " ;
	gotoxy(5,16) ;
	cout <<"Address : " ;
	do
	{
		a.clear(15,15) ;
		a.clear(5,23) ;
		gotoxy(5,23) ;
		cout <<"ENTER NAME " ;
		valid = 1 ;
		gotoxy(15,15) ;
		gets(t_name) ;
		strupr(t_name) ;
		if (t_name[0] == '0')
			return ;
		if (strlen(t_name) > 25)
		{
			valid = 0 ;
			gotoxy(5,23) ;
			cprintf("\7NAME SHOULD NOT GREATER THAN 25") ;
			getch() ;
		}
	} while (!valid) ;
	if (strlen(t_name) > 0)
		modified = 1 ;
	do
	{
		a.clear(15,16) ;
		a.clear(5,23) ;
		gotoxy(5,23) ;
		cout <<"ENTER ADDRESS " ;
		valid = 1 ;
		gotoxy(15,16) ;
		gets(t_address) ;
		strupr(t_address) ;
		if (t_address[0] == '0')
			return ;
		if (strlen(t_address) > 55)
		{
			valid = 0 ;
			gotoxy(5,23) ;
			cprintf("\7SHOULD NOT BLANK OR GREATER THAN 55") ;
			getch() ;
		}
	} while (!valid) ;
	if (strlen(t_address) > 0)
		modified = 1 ;
	if (!modified)
		return ;
	a.clear(5,23) ;
	do
	{
		a.clear(5,18) ;
		gotoxy(5,18) ;
		cout <<"Do you want to save changes (y/n): " ;
		ch = getche() ;
		if (ch == '0')
			return ;
		ch = toupper(ch) ;
	} while (ch != 'N' && ch != 'Y') ;
	if (ch == 'N')
		return ;
	modify_account(t_accno,t_name,t_address) ;
	gotoxy(5,21) ;
	cout <<"\7Record Modified" ;
	gotoxy(5,23) ;
	cout <<"Press any key to continue..." ;
	getch() ;
}


//**********************************************************
// THIS FUNCTION CLEAR THE GIVEN ROW AND COLUMNS
//**********************************************************

void account :: clear(int col, int row)
{
	for (int i=col; i<=78; i++)
	{
		gotoxy(i,row) ;
		cout <<" " ;
	}
}


//**********************************************************
// THIS FUNCTION ADDS THE GIVEN DATA INTO THE FILE
// BANKING.DAT
//**********************************************************

void account :: add_to_file(int t_accno, int d1, int m1, int y1, char t_tran, char t_type[10], float t_interest, float t_amount, float t_balance)
{
	fstream file ;
	file.open("BANKING.DAT", ios::app) ;
	accno = t_accno ;
	dd = d1 ;
	mm = m1 ;
	yy = y1 ;
	tran = t_tran ;
	strcpy(type,t_type) ;
	interest = t_interest ;
	amount = t_amount ;
	balance = t_balance ;
	file.write((char *) this, sizeof(account)) ;
	file.close() ;
}


//**********************************************************
// THIS FUNCTION DELETES THE RECORD FOR GIVIN ACCOUNT NO.
// FROM FILE BANKING.DAT
//**********************************************************

void account :: delete_account(int t_accno)
{
	fstream file ;
	file.open("BANKING.DAT", ios::in) ;
	fstream temp ;
	temp.open("temp.dat", ios::out) ;
	file.seekg(0,ios::beg) ;
	while ( !file.eof() )
	{
		file.read((char *) this, sizeof(account)) ;
		if ( file.eof() )
			break ;
		if ( accno != t_accno )
			temp.write((char *) this, sizeof(account)) ;
	}
	file.close() ;
	temp.close() ;
	file.open("BANKING.DAT", ios::out) ;
	temp.open("temp.dat", ios::in) ;
	temp.seekg(0,ios::beg) ;
	while ( !temp.eof() )
	{
		temp.read((char *) this, sizeof(account)) ;
		if ( temp.eof() )
			break ;
		file.write((char *) this, sizeof(account)) ;
	}
	file.close() ;
	temp.close() ;
}


//**********************************************************
// THIS FUNCTION ACCEPTS THE DATA TO ADD RECORDS IN THE
// FILE BANKING.DAT
//**********************************************************

void account :: new_account(void)
{
	char ch ;
	int i, valid ;
	clrscr() ;
	initial ini ;
	shape s ;
	s.box(2,2,79,24,218) ;
	s.line_hor(3,78,4,196) ;
	s.line_hor(3,78,22,196) ;
	gotoxy(71,1) ;
	cout <<"<0>=Exit" ;
	textbackground(BLUE) ;
	gotoxy(3,3) ;
	for (i=1; i<=76; i++) cprintf(" ") ;
	textbackground(BLACK) ;
	textcolor(RED+BLINK) ; textbackground(BLUE) ;
	gotoxy(32,3) ;
	cprintf("OPEN NEW ACCOUNT") ;
	textcolor(YELLOW) ; textbackground(BLACK) ;

	int d1, m1, y1 ;
	struct date d;
	getdate(&d);
	d1 = d.da_day ;
	m1 = d.da_mon ;
	y1 = d.da_year ;
	int t_accno ;
	t_accno = ini.last_accno() ;
	t_accno++ ;
	if (t_accno == 1)
	{
		ini.add_to_file(t_accno,"abc","xyz",1.1) ;
		ini.delete_account(t_accno) ;
		add_to_file(t_accno,1,1,1997,'D',"INITIAL",1.1,1.1,1.1) ;
		delete_account(t_accno) ;
	}
	char t_name[30], t[10], t_address[60] ;
	float t_bal=0.0, t_balance=0.0 ;

	gotoxy(5,6) ;
	cout <<"Date : "<<d1 <<"/" <<m1 <<"/" <<y1 ;
	gotoxy(5,8) ;
	cout <<"Account no. # " <<t_accno ;
	gotoxy(5,10) ;
	cout <<"Name    : " ;
	gotoxy(5,11) ;
	cout <<"Address : " ;
	gotoxy(5,12) ;
	cout <<"Name of Verifying person : " ;
	gotoxy(5,14) ;
	cout <<"Initial Deposit : " ;
	do
	{
		clear(15,10) ;
		clear(5,23) ;
		gotoxy(5,23) ;
		cout <<"ENTER NAME OF THE PERSON" ;
		valid = 1 ;
		gotoxy(15,10) ;
		gets(t_name) ;
		strupr(t_name) ;
		if (t_name[0] == '0')
			return ;
		if (strlen(t_name) == 0 || strlen(t_name) > 25)
		{
			valid = 0 ;
			gotoxy(5,23) ;
			cprintf("\7NAME SHOULD NOT BLANK OR GREATER THAN 25") ;
			getch() ;
		}
	} while (!valid) ;
	do
	{
		clear(15,11) ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
同产精品九九九| 有坂深雪av一区二区精品| 国产成人免费视频网站高清观看视频 | 成人av免费观看| 奇米色一区二区三区四区| 国产日韩欧美亚洲| 在线综合视频播放| 91一区二区三区在线观看| 日本中文字幕一区| 亚洲女人小视频在线观看| 精品国产在天天线2019| 欧美日韩视频一区二区| 成人免费视频视频在线观看免费| 天天综合网天天综合色| 亚洲人妖av一区二区| 久久夜色精品国产欧美乱极品| 欧美色电影在线| 成人激情av网| 国产麻豆精品视频| 蜜臀a∨国产成人精品| 亚洲综合精品久久| 亚洲欧美在线视频观看| 久久网站最新地址| 日韩三区在线观看| 8v天堂国产在线一区二区| 一本到不卡免费一区二区| 国产成人免费高清| 国产呦萝稀缺另类资源| 久久国产精品99久久久久久老狼 | 国产一区二区在线视频| 首页欧美精品中文字幕| 亚洲一区二区欧美日韩| 一区二区三区不卡视频在线观看| 国产精品女同一区二区三区| 国产亚洲欧美激情| 欧美精品一区二区精品网| 日韩欧美一区在线| 亚洲成人午夜电影| 久久综合狠狠综合久久综合88| 日韩欧美国产电影| 日韩免费高清电影| xfplay精品久久| 欧美白人最猛性xxxxx69交| 日韩欧美综合一区| 久久综合一区二区| 欧美国产97人人爽人人喊| 中文一区二区完整视频在线观看| 国产婷婷色一区二区三区在线| 国产日产欧产精品推荐色| 欧美激情中文字幕| 国产精品动漫网站| 一区二区三区在线观看网站| 亚洲午夜久久久久| 天堂一区二区在线| 美女性感视频久久| 国产福利一区二区三区在线视频| 成人国产精品视频| 日本乱人伦aⅴ精品| 欧美在线免费视屏| 欧美一激情一区二区三区| 2020国产精品自拍| 国产精品久久久久久久久果冻传媒 | 久久超碰97中文字幕| 激情综合色丁香一区二区| 国产成人亚洲综合a∨婷婷| 成人精品国产一区二区4080| 色av成人天堂桃色av| 欧美一卡二卡在线观看| 精品少妇一区二区三区日产乱码 | 成人性生交大片免费| 在线观看视频一区二区| 日韩欧美一级特黄在线播放| 日本一区二区久久| 一片黄亚洲嫩模| 狂野欧美性猛交blacked| 丰满亚洲少妇av| 欧美偷拍一区二区| 久久毛片高清国产| 亚洲激情第一区| 蜜桃传媒麻豆第一区在线观看| 国产白丝精品91爽爽久久| 在线观看日产精品| 久久嫩草精品久久久久| 亚洲免费大片在线观看| 奇米亚洲午夜久久精品| proumb性欧美在线观看| 欧美人成免费网站| 国产欧美综合在线| 日日摸夜夜添夜夜添精品视频 | 亚洲乱码一区二区三区在线观看| 青青草国产成人av片免费| 极品少妇xxxx精品少妇| 图片区日韩欧美亚洲| 国产激情一区二区三区桃花岛亚洲| 91视视频在线观看入口直接观看www | 538在线一区二区精品国产| 亚洲国产精品av| 五月天亚洲精品| 97久久精品人人爽人人爽蜜臀| 欧美一二三区在线观看| 亚洲免费观看高清完整版在线观看 | 日本高清视频一区二区| 欧美精品一区二区三区蜜桃 | 欧美国产日本视频| 奇米精品一区二区三区在线观看| 91在线国内视频| 日韩情涩欧美日韩视频| 亚洲一区二区精品视频| aaa国产一区| 国产亚洲成年网址在线观看| 天天影视网天天综合色在线播放| caoporn国产精品| 国产亚洲一二三区| 久久国产综合精品| 91 com成人网| 亚洲成a人片综合在线| 91老师国产黑色丝袜在线| 国产亚洲精品免费| 极品瑜伽女神91| 日韩一区二区在线看片| 丝袜亚洲另类欧美| 欧美亚洲综合在线| 一个色综合av| 一本到三区不卡视频| 成人免费一区二区三区在线观看| 国产一区二区不卡在线| 日韩丝袜情趣美女图片| 首页欧美精品中文字幕| 欧美日韩国产一级二级| 亚洲电影一区二区| 欧美日韩一级视频| 图片区日韩欧美亚洲| 欧美精品成人一区二区三区四区| 亚洲夂夂婷婷色拍ww47| 欧美亚洲一区三区| 亚洲综合久久久| 欧洲人成人精品| 亚洲国产精品一区二区久久恐怖片 | 日韩欧美亚洲另类制服综合在线| 精品国产99国产精品| 亚洲一区二区三区三| 欧美色爱综合网| 日韩激情视频在线观看| 91精品视频网| 黄色日韩网站视频| 久久亚洲精精品中文字幕早川悠里 | 日韩美女一区二区三区| 美美哒免费高清在线观看视频一区二区| 欧美精品v国产精品v日韩精品| 日一区二区三区| 精品国产凹凸成av人导航| 国内一区二区视频| 国产欧美一二三区| 成人精品亚洲人成在线| 亚洲精品高清在线观看| 欧美精品第1页| 国产精品99久久久久| 亚洲欧美一区二区久久 | 国产蜜臀av在线一区二区三区| 成人免费观看视频| 亚洲综合av网| 日韩免费视频线观看| 成人中文字幕电影| 亚洲一区二区欧美日韩 | 亚洲最色的网站| 69堂成人精品免费视频| 激情综合色综合久久| 国产精品第13页| 欧美日韩精品一区二区三区蜜桃| 秋霞午夜av一区二区三区| 久久久国际精品| 韩国一区二区三区| 日韩欧美一区在线| 丰满岳乱妇一区二区三区| 亚洲韩国一区二区三区| 欧美精品一区二区高清在线观看| 99国产精品久久久久久久久久 | 久久久777精品电影网影网| av一二三不卡影片| 天天综合色天天| 日本一区二区视频在线| 欧美日韩国产另类不卡| 国产一区二区精品久久| 亚洲伊人色欲综合网| www成人在线观看| 91成人网在线| 国产精品正在播放| 亚洲一二三专区| 国产欧美一区在线| 91精品婷婷国产综合久久竹菊| 成人免费的视频| 美女视频一区二区| 亚洲欧美在线视频| 精品国产露脸精彩对白| 在线观看国产91| 国产在线不卡一卡二卡三卡四卡| 亚洲最大成人网4388xx| 亚洲国产成人午夜在线一区| 91精品国产麻豆| 色www精品视频在线观看|