2024年【C++实战小项目】通讯录(三)数组模拟实现通讯录三大功能_c,2024年最新腾讯大数据开发开发面试凉凉

img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

需要这份系统化资料的朋友,可以戳这里获取

		s++;
		ss = i;
		cout << " ";
		cout << namez[i];
		for (int j = 1; j <= 10; j++)
		{
			cout << " ";
		}
		cout << bgz[i];
		for (int j = 1; j <= 10; j++)
		{
			cout << " ";
		}
		cout << agez[i];
		for (int j = 1; j <= 20 - 1; j++)
		{
			cout << " ";
		}
		cout << phonez[i];
		for (int j = 1; j <= 20 - 1; j++)
		{
			cout << " ";
		}
		cout << homez[i];
		cout << "\n";
	}
}
if (s == 0)
{
	cout << "没有找到这个人";
}
cout << "确认删除该联系人吗";
cout << endl;
cout << "1.yes";
cout << endl << "2.no" << endl;
int yesno1;
cin >> yesno1;
if (yesno1 == 1)
{
	over(ss);
}
else
{
	system("pause");
	playfirst();
}

}


基本如图所示




---


## 三.查找


删除是string3\_函数,我们来看看


### 3.1 Flowchart流程图





 Created with Raphaël 2.2.0 
 


























 进入函数 
 




 询问查找方式 
 




 提取数据 
 




 符合查找方式 
 




 输出 
 




 回到开始页面 
 




 通知错误 
 





 yes 
 





 yes 
 




 no 
 







---


### 3.2 三千字代码实现


然后我们再看看code



void string3_()
{
string string0 = “=====================================\n”;
string string1 = “1.通过名字查=\n”;
string string2 = “2.通过性别查=\n”;
string string3 = “3.通过年龄查=\n”;
string string4 = “4.通过地址查=\n”;
out06(string0);
out06(string1);
out06(string2);
out06(string3);
out06(string4);
out06(string0);
int string7 = 0;
string7 = input(string7);
switch (string7)
{
case 1:
cha1_();
case 2:
cha2_();
case 3:
cha3_();
case 4:
cha4_();
}
}




---


通过switch来分别到cha1\_ ~ cha4\_



void cha1_()
{
string name1 = “请输入名字:>\n”;
out06(name1);
string chaname;
input_string(chaname);
chaname = stringaaaa;
int s = 0;
cout << " 姓名";
for (int j = 1; j <= 12; j++)
{
cout << " ";
}
cout << “性别”;
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << “年龄”;
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << “电话”;
for (int j = 1; j <= 20; j++)
{
cout << " ";
}
cout << “地址”;
cout << “\n”;
for (int i = 1; i <= z - 1; i++)
{
if (namez[i] == chaname)
{
s++;

		cout << " ";
		cout << namez[i];
		for (int j = 1; j <= 10; j++)
		{
			cout << " ";
		}
		cout << bgz[i];
		for (int j = 1; j <= 10; j++)
		{
			cout << " ";
		}
		cout << agez[i];
		for (int j = 1; j <= 20 - 1; j++)
		{
			cout << " ";
		}
		cout << phonez[i];
		for (int j = 1; j <= 20 - 1; j++)
		{
			cout << " ";
		}
		cout << homez[i];
		cout << "\n";
	}
}
if (s == 0)
{
	cout << "没有找到这个人";
}
system("pause");
playfirst();

}

void cha2_()
{
string name1 = “请输入性别:>\n”;
out06(name1);
string chaname;
input_string(chaname);
chaname = stringaaaa;
if (chaname == “男”)chaname = “男”;
else if (chaname == “女”) chaname = “女”;
else chaname = “不男不女”;
cout << " 姓名";
for (int j = 1; j <= 12; j++)
{
cout << " ";
}
cout << “性别”;
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << “年龄”;
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << “电话”;
for (int j = 1; j <= 20; j++)
{
cout << " ";
}
cout << “地址”;
cout << “\n”;
int s = 0;
for (int i = 1; i <= z - 1; i++)
{
if (bgz[i] == chaname)
{
s++;
cout << " ";
cout << namez[i];
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << bgz[i];
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << agez[i];
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << phonez[i];
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << homez[i];
cout << “\n”;
}
}
if (s == 0)
{
cout << “没有找到这个人”;
}
system(“pause”);
playfirst();
}

void cha3_()
{
string name1 = “请输入年龄:>\n”;
out06(name1);
int chaage;
int s = 0;
cin >> chaage;
cout << " 姓名";
for (int j = 1; j <= 12; j++)
{
cout << " ";
}
cout << “性别”;
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << “年龄”;
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << “电话”;
for (int j = 1; j <= 20; j++)
{
cout << " ";
}
cout << “地址”;
cout << “\n”;
cout << " “;
for (int i = 1; i <= z - 1; i++)
{
if (agez[i] == chaage)
{
s++;
cout << " 姓名”;
for (int j = 1; j <= 12; j++)
{
cout << " ";
}
cout << “性别”;
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << “年龄”;
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << “电话”;
for (int j = 1; j <= 20; j++)
{
cout << " ";
}
cout << “地址”;
cout << “\n”;
cout << " ";
cout << namez[i];
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << bgz[i];
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << agez[i];
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << phonez[i];
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << homez[i];
cout << “\n”;
}
}
if (s == 0)
{
cout << “没有找到这个人”;
}
system(“pause”);
playfirst();
}

void cha4_()
{
string name1 = “请输入地址:>\n”;
out06(name1);
string chaname;
input_string(chaname);
chaname = stringaaaa;
int s = 0;
cout << " 姓名";
for (int j = 1; j <= 12; j++)
{
cout << " ";
}
cout << “性别”;
for (int j = 1; j <= 10; j++)
{
cout << " ";
}
cout << “年龄”;
for (int j = 1; j <= 20 - 1; j++)
{
cout << " ";
}
cout << “电话”;
for (int j = 1; j <= 20; j++)
{
cout << " ";
}
cout << “地址”;
cout << “\n”;
cout << " ";
for (int i = 1; i <= z - 1; i++)
{
if (homez[i] == chaname)
{
s++;

		cout << namez[i];
		for (int j = 1; j <= 10; j++)
		{
			cout << " ";
		}
		cout << bgz[i];
		for (int j = 1; j <= 10; j++)
		{
			cout << " ";
		}
		cout << agez[i];
		for (int j = 1; j <= 20 - 1; j++)
		{
			cout << " ";
		}
		cout << phonez[i];
		for (int j = 1; j <= 20 - 1; j++)
		{
			cout << " ";
		}
		cout << homez[i];
		cout << "\n";
	}
}
if (s == 0)
{
	cout << "没有找到这个人";
}
system("pause");
playfirst();

}




---


## 四.修改


### 4.1 Flowchart流程图





 Created with Raphaël 2.2.0 
 























 进入函数 
 




 输入名字 
 




 判断 
 




 修改各项值 
 




 回到开始页面 
 




 通知错误 
 






 yes 
 




 no 
 






![img](https://img-blog.csdnimg.cn/img_convert/f7a17a7a2eb1edaf2303aca76abe418b.png)
![img](https://img-blog.csdnimg.cn/img_convert/c1fd6de4d844d26108a9e37fbf83cc85.png)

**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)**


**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**


四.修改

4.1 Flowchart流程图

Created with Raphaël 2.2.0

进入函数

输入名字

判断

修改各项值

回到开始页面

通知错误

yes

no

[外链图片转存中…(img-u0jU5ibn-1715577888689)]
[外链图片转存中…(img-p9kQLz2O-1715577888689)]

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值