分享一个文件

给大家分享我制作的名单系统(十分简陋

#include<iostream>
using namespace std;
int main()
{
	cout<<"人物名单1.0"<<endl;
	int a,b,c=0,d,e,f;
	string name[100],juese;
	b=0;
	while(d=1)
	{
	cout<<"查询人物请按2,添加人物请输入1,减少人物输入0"<<endl;
	cout<<"输入:"; 
	cin>>a;
	    if(a==0)
	    {
		    cout<<"--------------------"<<endl;
			if(b=0)
		    {
	    		cout<<"无角色"; 
    		}
    		cout<<"输入编号:"; 
			cin>>e;
			if(c<e)
			{
				cout<<"错误"<<endl; 
			}
			else
			{
				for(f=b;f=b;f=f+0)
			    {
			    	name[f-1]=name[99];
		    	}
		    	c--;
		        cout<<"执行成功"<<endl;
		    }
			f=0;
			e=0;
			a=2;
			cout<<"--------------------"<<endl;
    	}
    	if(a==1)
    	{
    		cout<<"--------------------"<<endl;
			cout<<"输入角色:";
    		cin>>juese;
			name[c]=juese;
			c++;
			a=0;
			cout<<"执行成功"<<endl; 
			cout<<"--------------------"<<endl;
		}
		if(a==2)
		{   
		    if(c!=0)
		    {
			cout<<"--------------------"<<endl;
			for(f=0;f<c;f++)
			{
				cout<<f+1<<":"<<name[f]<<endl;
			}
			cout<<"执行成功"<<endl;
			cout<<"--------------------"<<endl;
		    }
		    if(c==0)
		    {
		    	cout<<"--------------------"<<endl;	
				cout<<"无角色"<<endl;
		    	cout<<"--------------------"<<endl;	
			}
		}
    }
} 

这个“工具”有些问题,大家如果有什么报错的话可以私信我。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值