摘要:
#include"pch.h" #include #include using namespace std; struct Student { int id; char number[16]; char name[16]; Student* next; }; //使用全局变量 Student ss[4] = { {201501,"John",0}, {20... 阅读全文
摘要:
变量可以理解为就是内存,变量改变了内存就发生了变化 推荐阿发你好的视频 阅读全文
摘要:
构造函数是一种特殊的函数,它和类同名但是不返回任何值,可以在类声明中定义也可以在类声明之外定义 //重载构造函数 阅读全文
摘要:
Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a 阅读全文
摘要:
#include #include #include typedef int ElemType; typedef struct{ ElemType *elem; int TableLen; }SSTable; void ST_Init(SSTable &ST,int len) { ST.TableLen=len+1; ST.elem=(ElemType *)ma... 阅读全文
摘要:
#include #include using namespace std; struct huffTree { int parent; int lchild; int rchild; int weight; string flag; }; struct Lowest_Node//第0级节点的字符与频度 { char ch; i... 阅读全文
摘要:
//构造函数的作用:就是在函数被创建时使用特定的值构造对象,将对象初始化为一个特定的初始状态//例如在构造一个clock类对象的时候,将初始的时间设定为0:0:0//构造函数的名必须与类名相同,不能定义返回值的类型,也不能有return语句//可以有形式参数,也可以没有//可以是内联函数,可以重载 阅读全文
摘要:
开始涉及类和对象了 阅读全文
摘要:
//介绍了内联函数、引用、以及带有参数值的函数的使用例子/*#include"pch.h" #include using namespace std; #define MAXSIZE 100 #define ElemType int //typedef int ElemType; typedef struct { ElemType *elem; int length; }SqL... 阅读全文
摘要:
// ConsoleApplication2.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // /*#include "pch.h" #include using namespace std; enum GameResult{WIN,LOSE,TIE,CANCEL}; int main() { GameResult result; enum ... 阅读全文