服务器之家:专注于VPS、云服务器配置技术及软件下载分享
分类导航

PHP教程|ASP.NET教程|Java教程|ASP教程|编程技术|正则表达式|C/C++|IOS|C#|Swift|Android|VB|R语言|JavaScript|易语言|vb.net|

服务器之家 - 编程语言 - C/C++ - C++实现图书管理系统课程设计(面向对象)

C++实现图书管理系统课程设计(面向对象)

2022-10-19 13:29蓉蓉兔6864 C/C++

这篇文章主要为大家详细介绍了C++实现图书管理系统课程设计,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

本文实例为大家分享了C++实现图书管理系统课程设计,供大家参考,具体内容如下

1.题目:

【1】:工作人员登录后,可以进行的操作

添加学生的信息(学号,姓名,院系,最大借阅的图书数量等);
修改学生的信息(学号,姓名,院系,最大借阅的图书数量等);
删除学生的信息(学号,姓名,院系,最大借阅的图书数量等);
如果某个学生退学,就要清除他的信息;
查看学生的信息;
添加图书的信息(图书号,书名,作者,出版社,数量等);
修改图书的信息(图书号,书名,作者,出版社,数量等);
删除图书的信息(图书号,书名,作者,出版社,数量等);
查看图书的信息;

【2】:学生登录后,可以进行的操作

查看学生自己借阅的数目信息;
借阅图书;
归还图书;
备注:要求将学生和图书信息存放到外存上,每次从外存读取数据;

2.代码

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
/**
 *项目名称:图书管理系统
 *语言:C++
 **/
 
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <vector>
#include <stdlib.h>
#include <string.h>
using namespace std;
 
//构建学生类
class Student
{
public:
    Student()
    {
        memset(s_num, 0, sizeof(s_num));
        memset(s_name,0, sizeof(s_name));
        memset(s_name, 0, sizeof(college, 0, sizeof(college)));
        borrow_max = 0;
        borrow_quantity = 0;
        memset(borrow_books, 0, sizeof(borrow_books));
    }
    char s_num[15];   //学号
    char s_name[10];  //姓名
    char college[30]; //院系
    int borrow_max;     //最大借阅数量
    int borrow_quantity;     //借阅数量
    char borrow_books[10][30]; //借阅图书
 
    bool S_SetInto();   //设置学生信息
    friend istream& operator>>(istream& in, Student& cp);  //提取运算符重载
    friend ostream& operator<<(ostream& out, Student& cp); //插入运算符重载
    bool S_If_match(char p[30]);  //判断学号是否匹配
    void s_display();  //显示学生信息
};
 
//设置学生信息
bool Student::S_SetInto()
{
    char temp[15];
    cout << "请输入学号:(输入+退出)";
    cin >> temp;
    if (temp[0] == '+')
    {
        return false;
    }
    strcpy(s_num, temp);
    cout << "学生姓名:";
    cin >> s_name;
    cout << "院系:";
    cin >> college;
    do
    {
        cout << "最大借阅数量(1-10):";
        cin >> borrow_max;
    }
    while (borrow_max <= 0 || borrow_max > 10);
    return true;
}
 
//提取运算符重载
istream& operator>>(istream& in, Student& cp)
{
    in >> cp.s_num >> cp.s_name >> cp.college >> cp.borrow_max >> cp.borrow_quantity;
    for (int i = 0; i < cp.borrow_quantity; i++)
    {
        in >> cp.borrow_books[i];
    }
    return in;
}
 
//插入运算符重载
ostream& operator<<(ostream& out, Student& cp)
{
    out << cp.s_num << ' ' << cp.s_name << ' ' << cp.college << ' ' << cp.borrow_max << ' ' << cp.borrow_quantity << ' ';
    for (int i = 0; i < 10; i++)
    {
        out << cp.borrow_books[i] << ' ';
        if (i == 9)
        {
            out << '\n';
        }
    }
    return out;
}
 
//判断学号是否匹配
bool Student::S_If_match(char p[30])
{
    return (!strcmp(s_num, p)||!strcmp(s_name, p));
}
 
//显示学生信息
void Student::s_display()                                        //显示
{
    cout << setiosflags(ios::left) << "学号:" << setw(12) << s_num << "    " << setw(10) << s_name << "    " << setw(25) << college << endl
        << "最大借阅量" << borrow_max << endl;
}
 
//构建图书类
class Book
{
public:
    char b_num[15]; //图书号
    char b_name[30]; //书名
    char author[20];  //作者
    char p_house[30]; //Publishing House 出版社
    int b_quantity;   //图书数量
 
    bool B_SetInto();     //设置图书信息
    friend istream& operator>>(istream& in, Book& cp);   //提取运算符重载
    friend ostream& operator<<(ostream& out, Book& cp);  //插入运算符重载
    bool B_If_match(char p[30]);
    void b_display();  //图书信息显示
};
 
//设置图书信息
bool Book::B_SetInto()
{
    char temp[15];
    cout << "请输入图书号:(输入+退出)";
    cin >> temp;
    if (temp[0] == '+')
        return false;
    strcpy(b_num, temp);
    cout << "书名:";
    cin >> b_name;
    cout << "作者:";
    cin >> author;
    cout << "出版社";
    cin >> p_house;
    cout << "数量:";
    cin >> b_quantity;
    return true;
}
 
//提取运算符重载
istream& operator>>(istream& in, Book& cp)
{
    in >> cp.b_num >> cp.b_name >> cp.author >> cp.p_house >> cp.b_quantity;
    return in;
}
 
//插入运算符重载
ostream& operator<<(ostream& out, Book& cp)
{
    out << cp.b_num <<' '<< cp.b_name <<' '<< cp.author <<' '<< cp.p_house <<' '<< cp.b_quantity<<'\n';
    return out;
}
 
//判断图书号是否匹配
bool Book::B_If_match(char p[30])
{
        return (!strcmp(b_num, p)|| !strcmp(b_name, p));
}
 
//显示函数
void Book:: b_display()
{
    cout << setiosflags(ios::left) << setw(12) << b_num << "    " << setw(30) << b_name << "    " << setw(10) << author << endl
        << setw(20) << p_house << "    " <<"剩余数量:"<< setw(3) << b_quantity << endl;
}
 
//构建管理类
class management
{
public:
    int s_sum=0;  //学生数
    int b_sum=0;  //图书数
    string key;  //管理员密码
    vector<Student> s_array;  //记录学生类
    vector<Book> b_array; //记录图书类
 
    void S_clear();  //清理已有学生信息
    void B_clear();  //清理已有图书信息
    void S_Read_file(); //读取学生文件
    void S_Save_file(); //保存学生文件
    void B_Read_file(); //读取图书文件
    void B_Save_file(); //保存图书文件
 
    bool Student_add(); //添加学生信息
    bool Student_mod(); //修改学生信息
    bool Student_del(); //删除学生信息
    bool Student_scan();  //查看学生信息
 
    bool Book_add();  //添加图书信息
    bool Book_mod();  //修改图书信息
    bool Book_del();  //删除图书信息
    bool Book_scan(); //查看图书信息
 
    bool s_login(Student& cp);    //学生凭学号登录
    bool borrow_scan(Student &cp);   //查看借阅数目
    bool borrow_book(Student &cp);   //借书
    bool return_book(Student &cp);   //还书
 
    bool Student_System();   //学生登录
    bool Personnel_System();    //工作人员登录
    void login_init();    //登录界面初始化
};
 
//清理已有学生信息
void management::S_clear()
{
    s_array.clear();
    s_sum = 0;
}
 
//清理已有图书信息
void management::B_clear()
{
    b_array.clear();
    b_sum = 0;
}
 
//读取学生文件
void management::S_Read_file()
{
    ifstream s_file;
    s_file.open("Student_Information.txt");
    if (!s_file.is_open())
    {
        cerr << "文件\"Student_Information.txt\"无法打开\n";
        exit(1);
    }
    while (!(s_file.eof()))
    {
        Student stu;
        s_file >> stu;
        s_array.push_back(stu);
        s_sum++;
    }
    s_sum--;
    s_file.close();
}
 
//保存学生文件
void management::S_Save_file()
{
    ofstream s_file("Student_Information.txt");
    if (!s_file)
    {
        cerr << "文件\"Student_Information.txt\"无法打开!\n";
        exit(1);
    }
    int i = -1;
    while (++i < s_sum)
    {
        s_file << s_array[i];
    }
    s_file.close();
}
 
//读取图书文件
void management::B_Read_file()
{
    ifstream b_file;
    b_file.open("Book_Information.txt");
    if (!b_file.is_open())
    {
        cerr << "文件\"Book_Information.txt\"无法打开\n";
        exit(1);
    }
    while (!b_file.eof())
    {
        Book _book;
        b_file >> _book;
        b_array.push_back(_book);
        b_sum++;
    };
    b_sum--;
    b_file.close();
}
 
//保存图书文件
void management::B_Save_file()
{
    ofstream b_file("Book_Information.txt");
    if (!b_file)
    {
        cerr << "文件\"Book_Information.txt\"无法打开!\n";
        exit(1);
    }
    int i = -1;
    while (++i < b_sum)
    {
        b_file << b_array[i];
    }
    b_file.close();
}
 
//添加学生信息
bool management::Student_add()
{
    S_Read_file();
    Student _stu;
    cout << "请进行信息录入。按“+”结束!\n";
    do
    {
        s_array.push_back(_stu);
    }
    while (s_array[s_sum++].S_SetInto());
    s_sum--;
    s_array.pop_back();
    return true;
}
 
//修改学生信息
bool management::Student_mod()
{
    char _s_num[15];
    S_Read_file();
    cout << "请输入您要修改的学生信息的学号或名字:";
    cin >> _s_num;
    int i = 0;
    for (; i < s_sum; i++)
    {
        if (s_array[i].S_If_match(_s_num))
        {
            cout << "该同学的原信息为:\n";
            s_array[i].s_display();
            cout << "请输入正确信息! \n";
            s_array[i].S_SetInto();
            s_sum++;  //保持学生数
            return true;
        }
        if (i == s_sum)
        {
            cout << "抱歉!您要修改的信息不存在! " << endl;
            return false;
        }
        break;
    }
}
 
//删除学生信息
bool management::Student_del()
{
    char _s_num[15];
    S_Read_file();
    cout << "请输入您要删除的学生信息的学号:";
    cin >> _s_num;
    for (int i = 0; i < s_sum; i++)
    {
        if (s_array[i].S_If_match(_s_num))
        {
            cout << "该同学的原信息为:\n";
            s_array[i].s_display();
            s_array.erase(s_array.begin() + i);
            s_sum--;
            return true;
        }
        if (i == s_sum)
        {
            cout << "抱歉!您要删除的信息不存在! " << endl;
            return false;
        }
    }
}
 
//查看学生信息
bool management::Student_scan()
{
    S_Read_file();
    if (s_sum == 0)
    {
        cout << "暂无信息!请等待管理人员更新!";
        return false;
    }
    for (int i = 0; i < s_sum; i++)
    {
        s_array[i].s_display();
    }
    return true;
}
 
//添加图书信息
bool management::Book_add()
{
    B_Read_file();
    Book _book;
    cout << "请进行信息录入。按“+”结束!\n";
    do
    {
        b_array.push_back(_book);
    } while (b_array[b_sum++].B_SetInto());
    b_sum--;
    b_array.pop_back();
    return true;
}
 
//修改图书信息
bool management::Book_mod()
{
    char _b_num[30];
    B_Read_file();
    cout << "请输入您要修改的图书信息的图书号或书名:";
    cin >> _b_num;
    for (int i = 0; i < b_sum; i++)
    {
        if (b_array[i].B_If_match(_b_num))
        {
            cout << "该图书的原信息为:\n";
            b_array[i].b_display();
            cout << "请输入正确信息! \n";
            b_array[i].B_SetInto();
            b_sum++;  //保持总航线数不变
            return true;
        }
        if (i == b_sum)
        {
            cout << "抱歉!您要修改的信息不存在! " << endl;
            return false;
        }
        break;
    }
}
 
//删除图书信息
bool management::Book_del()
{
    char _b_num[15];
    B_Read_file();
    cout << "请输入您要删除的图书信息的图书号:";
    cin >> _b_num;
    for (int i = 0; i < b_sum; i++)
    {
        if (b_array[i].B_If_match(_b_num))
        {
            cout << "该图书的原信息为:\n";
            b_array[i].b_display();
            b_array.erase(b_array.begin() + i);
            b_sum--;
            return true;
        }
        if (i == b_sum)
        {
            cout << "抱歉!您要删除的信息不存在! " << endl;
            return false;
        }
    }
}
 
//查看图书信息
bool management::Book_scan()
{
    B_Read_file();
    if (b_sum == 0)
    {
        cout << "暂无信息!请等待管理人员更新!";
        return false;
    }
    for (int i = 0; i < b_sum; i++)
    {
        b_array[i].b_display();
    }
    return true;
}
 
//学生凭学号登录
bool management::s_login(Student& cp)
{
    char _s_num[15];
    S_Read_file();
    cout << "请输入您的学号:";
    cin >> _s_num;
    for (int i = 0; i < s_sum; i++)
    {
        if (s_array[i].S_If_match(_s_num))
        {
            cp=s_array[i];
            cout << "欢迎您," << cp.s_name << "同学!" << endl;
            S_clear();
            return true;
        }
    }
    S_clear();
    return false;
}
 
//查看借阅数数目
bool management::borrow_scan(Student& cp)
{
    S_Read_file();
    B_Read_file();
    cout << "您已借阅图书" << setw(3) << cp.borrow_quantity << "本" << endl;
    for (int i = 0; i < cp.borrow_quantity; i++)
    {
        cout << cp.borrow_books[i] << endl;
    }
    S_clear();
    B_clear();
    return true;
}
 
//借书
bool management::borrow_book(Student& cp)
{
    S_Read_file();
    B_Read_file();
    char _b_num[30];
    cout << "请输入想借图书的图书号或书名:";
    cin >> _b_num;
    for (int i = 0; i < b_sum; i++)
    {
        if (b_array[i].B_If_match(_b_num))
        {
            cout << "该图书的信息为:\n";
            b_array[i].b_display();
            b_array[i].b_quantity--;
            if (cp.borrow_quantity > cp.borrow_max - 1)
            {
                cout << "抱歉,您已达借书最大上限!" << endl;
                return false;
            }
            strcpy(cp.borrow_books[cp.borrow_quantity++],b_array[i].b_name);
            for (int j = 0; j < s_sum; j++)
            {
                if (s_array[j].S_If_match(cp.s_num))
                {
                    s_array[j]=cp;
                    return true;
                }
            }
        }
        if (i == b_sum - 1)
        {
            cout << "抱歉!您想借的图书未收录! " << endl;
            return false;
        }
    }
 
}
 
//还书
bool management::return_book(Student& cp)
{
    S_Read_file();
    B_Read_file();
    char _b_num[30];
    cout << "请输入想还图书的图书号或书名:";
    cin >> _b_num;
    for (int i = 0; i < b_sum; i++)
    {
        if (b_array[i].B_If_match(_b_num))
        {
            cout << "该图书的信息为:\n";
            b_array[i].b_display();
            b_array[i].b_quantity++;
            for (int k = 0; k < cp.borrow_quantity; k++)
            {
                if (!strcmp(cp.borrow_books[k],b_array[i].b_name))
                {
                    for (int m = k; m < cp.borrow_quantity-1; m++)
                    {
                        strcpy(cp.borrow_books[m], cp.borrow_books[m+1]);
                    }
                    strcpy(cp.borrow_books[--cp.borrow_quantity], "");
//                    cp.borrow_quantity--;
                    break;
                }
            }
            for (int j = 0; j < s_sum; j++)
            {
 
                if (s_array[j].S_If_match(cp.s_num))
                {
                    s_array[j] = cp;
                    return true;
                }
            }
        }
        if (i == b_sum)
        {
            cout << "抱歉!您想还的图书未收录! " << endl;
            return false;
        }
    }
}
 
//工作人员登录
bool management::Personnel_System()
{
    while (1)
    {
        int menu_options;
 
        cout << "请输入登录密码:";
        cin >> key;
        if (key == "123456")  //登录密码
            while (1)
            {
                cout << endl
                    << "*****       主菜单:                                          **********" << endl
                    << "*****    工作人员                          " << endl
                    << "*****    1——添加学生信息                    "
                    << "2——修改学生信息" << endl
                    << "*****    3——删除学生信息                    "
                    << "4——查看学生信息" << endl
                    << endl                                                //区分学生和图书
                    << "*****    5——添加图书信息                    "
                    << "6——修改图书信息" << endl
                    << "*****     7——删除图书信息                    "
                    << "8——查看图书信息" << endl
                    << "*****    9——退出登录"<<endl
                    << "你需要做什么?(1-9)" << endl;
                cin >> menu_options;
                switch (menu_options)
                {
                case 1:Student_add(); break;
                case 2:Student_mod(); break;
                case 3:Student_del(); break;
                case 4:Student_scan(); break;
                case 5:Book_add(); break;
                case 6:Book_mod(); break;
                case 7:Book_del(); break;
                case 8:Book_scan(); break;
                case 9:return false;
                default:cout << "输入错误,请重新选择" << endl; break;
                }
                if (!(menu_options == 4 || menu_options == 8))
                {
                    cout << "是否确认?        《确认/(Y/y)》    《取消/(N/n)》" << endl;
                    char yn;
                    do
                    {
                        cin >> yn;
                    } while (!(yn == 'Y' || yn == 'y' || yn == 'N' || yn == 'n'));
                    if (yn == 'Y' || yn == 'y')
                    {
                        if (menu_options == 1 || menu_options == 2 || menu_options == 3)
                        {
                            S_Save_file();
                        }
                        else if (menu_options == 5 || menu_options == 6 || menu_options == 7)
                        {
                            B_Save_file();
                        }
                        cout << "操作成功";
                    }
                }
                S_clear();
                B_clear();
            }
        else
        {
            cout << "密码错误!" << endl;
            continue;
        }
    }
    return true;
}
 
//学生登录
bool management::Student_System()
{
    while (1)
    {
        Student cp;
        bool key = s_login(cp);
        while (key)
        {
            int menu_options;
 
            cout << "*****     主菜单:                                             **********" << endl
                << "*****     学生:                            " << endl
                << "*****     1——查看借阅数目" << endl
                << "*****     2——借阅图书" << endl
                << "*****     3——归还图书" << endl
                << "*****    4——退出登录" << endl
                << "你需要做什么?(选择1-4)" << endl;
            cin >> menu_options;
            switch (menu_options)
            {
            case 1:borrow_scan(cp); break;
            case 2:borrow_book(cp); break;
            case 3:return_book(cp); break;
            case 4:return false;
            }
            if (menu_options == 2 || menu_options == 3)
            {
                cout << "是否确认?        《确认/(Y/y)》    《取消/(N/n)》" << endl;
                char yn;
                do
                {
                    cin >> yn;
                } while (!(yn == 'Y' || yn == 'y' || yn == 'N' || yn == 'n'));
                if (yn == 'Y' || yn == 'y')
                {
                    cout << "操作成功!" << endl;
                    S_Save_file();
                    B_Save_file();
                }
            }
            S_clear();
            B_clear();
        }
        cout << "未找到您的信息!" << endl;
    }
    return true;
}
 
//界面初始化函数
void management::login_init()
{
    system("cls");
    cout << "\n>>>>>>>>>>欢迎进入图书管理系统<<<<<<<<<<" << endl
        << "请输入您的登录方式" << endl
        << "1——工作人员(需要认证)    2——学生 3——退出系统" << endl;
}
 
 
//主函数
int main()
{
    management xiangnan;
 
    //若文件不存在,则新建文件
    //存放学生信息
    ofstream Student_Information("Student_Information.txt", ios::app);
    if (!Student_Information)
    {
        cerr << "文件\"flight information.dat\"无法打开!\n";
        exit(1);
    }
    Student_Information.close();
 
    //存放图书信息
    ofstream Book_Information("Book_Information.txt", ios::app);
    if (!Book_Information)
    {
        cerr << "文件\"flight information.dat\"无法打开!\n";
        exit(1);
    }
    Book_Information.close();
 
    int dlry;   //登陆人员
    while (1)
    {
        xiangnan.login_init();   //界面初始化
        cin >> dlry;
        if (dlry == 1)
        {
            xiangnan.Personnel_System();
        }
        else if (dlry == 2)
        {
            xiangnan.Student_System();
        }
        else if (dlry == 3)
        {
            return 0;
        }
        else
        {
            cout << "输入错误,请重新选择!" << endl;
        }
    }
    return 0;
}

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。

原文链接:https://blog.csdn.net/qq_45958407/article/details/107160109

延伸 · 阅读

精彩推荐
  • C/C++C++实现简单扫雷小游戏

    C++实现简单扫雷小游戏

    这篇文章主要为大家详细介绍了C++实现简单扫雷小游戏,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...

    Who_Am_I.8682021-09-28
  • C/C++c/c++中struct定义、声明、对齐方式解析

    c/c++中struct定义、声明、对齐方式解析

    这篇文章通过C/C++的两种声明方式开始,给大家详细分析了/c+中struct定义、声明、对齐方式,对此有兴趣的朋友可以参考学习下。...

    C语言教程网6232021-06-21
  • C/C++C++实现校园运动会报名系统

    C++实现校园运动会报名系统

    这篇文章主要为大家详细介绍了C++实现校园运动会报名系统,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...

    不想悲伤到天明4862021-07-02
  • C/C++C语言中 int main(int argc,char *argv[])的两个参数详解

    C语言中 int main(int argc,char *argv[])的两个参数详解

    这篇文章主要介绍了C语言中 int main(int argc,char *argv[])的两个参数详解的相关资料,需要的朋友可以参考下...

    C语言教程网4762021-05-04
  • C/C++C++小知识:不要节约代码行数

    C++小知识:不要节约代码行数

    今天小编就为大家分享一篇关于C++小知识:不要节约代码行数,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来...

    修语讲编程10822021-07-18
  • C/C++C语言运算符的重载详细介绍

    C语言运算符的重载详细介绍

    这篇文章主要为大家详细介绍C语言运算符的重载,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,希望能够给你带...

    PingBryant8592022-09-29
  • C/C++基于C中一个行压缩图的简单实现代码

    基于C中一个行压缩图的简单实现代码

    首先简单说一下什么是行压缩图,其实严格意义上应该是行压缩矩阵...

    C语言教程网3032020-11-23
  • C/C++C程序实现整数的素数和分解问题

    C程序实现整数的素数和分解问题

    这篇文章主要介绍了C程序实现整数的素数和分解问题,对于算法的学习有不错的借鉴价值,需要的朋友可以参考下...

    C语言程序设计11262021-02-03