资源简介

C++命令行实现的学生社团管理系统,实现了学生的增添删除修改,社团的增添删除修改以及学生在社团中的一些操作

资源截图

代码片段和文件信息

#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

评论

共有 条评论