std::pair 是一个结构体模板,其可于一个单元内存储两个相异对象。是 std::tuple 的拥有两个元素的特殊情况。 一般来说,pair 可以封装任意类型的对象,可以生成各种不同的 std::pair<T1, T2> 对象,可以是数组对象或者包含 std::pair<T1,T2> 的 vec ...
                            
                            
                                分类:
其他好文   时间:
2019-12-26 00:00:10   
                                阅读次数:
240
                             
                         
                    
                        
                            
                            
                                // 从文本文件file1.dat中读取数据,找出最高分和最低分学生信息,并输出在屏幕上 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef struct student { int num; cha ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 20:20:38   
                                阅读次数:
63
                             
                         
                    
                        
                            
                            
                                    原理: 原理主要是 使用 VirtualQueryEx 函数. 函数遍历之后会将内存信息反馈到一个Buf中.这个Buf是个结构体 PMEMORY_BASIC_INFORMATION ...
                            
                            
                         
                    
                        
                            
                            
                                1-2 #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int sco ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 01:55:41   
                                阅读次数:
83
                             
                         
                    
                        
                            
                            
                                #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score;  ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 01:54:14   
                                阅读次数:
99
                             
                         
                    
                        
                            
                            
                                #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score;  ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 01:33:16   
                                阅读次数:
52
                             
                         
                    
                        
                            
                            
                                #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score;  ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 01:24:34   
                                阅读次数:
60
                             
                         
                    
                        
                            
                            
                                    抽象介绍: 在定义一个结构体的时候,实际上就是把一类事物的共有属性(字段)和行为(方法) 提取出来,形成一个物理模型(模板),这种研究问题的方法称为抽象。 封装: 把抽象出的字段和对字段的操作封装在一起,数据被保护在内部,程序的其它包只有通过被授权的操作(方法),才能对字段进行操作。 1)将结构体、 ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 01:23:00   
                                阅读次数:
106
                             
                         
                    
                        
                            
                            
                                #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score;  ...
                            
                            
                                分类:
其他好文   时间:
2019-12-25 01:14:36   
                                阅读次数:
61
                             
                         
                    
                        
                            
                            
                                #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score;  ...
                            
                            
                                分类:
其他好文   时间:
2019-12-24 23:22:01   
                                阅读次数:
70