资源简介
C++命令行实现的学生社团管理系统,实现了学生的增添删除修改,社团的增添删除修改以及学生在社团中的一些操作
![](http://www.nz998.com/pic/41407.jpg)
代码片段和文件信息
#include
#define _WIN32_WINNT 0x0500
#include
#include
#include
#include
#include
#include
#include
#define MALE 1
#define FEMALE 2
#define LL long long
using namespace std;
#include “student.h“
vector stu;
#include “top.h“
#include “corporation.h“
vector C;
void Printstin(struct student s)//打印学生信息
{
pt();
// printf(“201522332\tklc\tnan\tgrade1\tcomputerscience\n“);//学号\t姓名\t性别\t年级\t专业
printf(“%-10I64d\t%s\t“s.nums.name);
if(s.sex==FEMALE) printf(“女“);
else if(s.sex==MALE) printf(“男“);
else printf(“未知性别“);
printf(“\t%d年级\t%s\n“s.grades.major);
/**找到包含此学生的社团并保存到string S中**/
vector w;
vector e;
w.clear();
e.clear();
int ijd=C.size()p;
for(i=0; i {
p=C[i].studen.size();
for(j=0; j {
if(C[i].studen[j]==s.num)
{
w.push_back(C[i].name);
e.push_back(C[i].num);
break;
}
}
}
p=w.size();
if(p!=0)
{
pt();
puts(“已加入的社团:“);
pt();
j=0;
for(i=0; i {
if(j==5)
{
puts(““);
pt();
j=0;
}
cout< }
}
printf(“\n“);
}
int Addstudent(struct student &tep)//添加学生
{
pt();
puts(“■添加新学生:“);
//int et=0;
char c;
char ss[100];
while(1)
{
pt();
printf(“■输入学号:“);
gets(ss);
int t=judge1(ss);
if(t==-1)
{
tep.num=change(ss);
while(1)
{
pt();
printf(“■输入姓名:“);
gets(ss);
if(judge2(ss)==1)
{
strcpy(tep.namess);
while(1)
{
pt();
printf(“■输入一个数字代表性别:1为男2为女:“);
gets(ss);
if(judge3(ss)==1)
{
tep.sex=ss[0]-‘0‘;
while(1)
{
pt();
printf(“■输入年级(纯数字):“);
gets(ss);
if(judge4(ss)==1)
{
tep.grade=change(ss);
while(1)
{
pt();
printf(“■输入专业:“);
gets(ss);
if(judge2(ss)==1)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-17 20:16 StudentCoporationManage-master\
文件 5856 2018-04-17 20:14 StudentCoporationManage-master\corporation.h
文件 45872 2018-04-17 20:14 StudentCoporationManage-master\main.cpp
文件 235 2018-04-17 20:14 StudentCoporationManage-master\student.h
文件 5047 2018-04-17 20:14 StudentCoporationManage-master\top.h
- 上一篇:VC++和OpenGL实现八叉树分割
- 下一篇:k均值聚类算法
相关资源
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- LINUX下命令行界面的C语言细胞游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
评论
共有 条评论