摘要: //string1.cpp #include int main() { using namespace std; char dog[4]={'d','o','g'}//这是char数组,也即字符数组 char dog1[4]={'d','o','g','\0'}//这是字符串 char sex[8]; /* char sex[] 是不被允许... 阅读全文
posted @ 2018-09-30 11:36 谷谷非鼠 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 链表是一群结构体(称为结点)通过指针连起来。这种结构体类型,比较特殊,叫自引用结构体类型。它有一个指针指向和和结构体一样的类型,其余是数据成员。 头指针指向第一结点,尾指针一定要用空表示,这叫有头有尾。一般在表头加头结点,之后才是正式含数据的结点。 这些结点通过头指针访问,所以若头指针值为空,那么链 阅读全文
posted @ 2018-09-30 11:10 谷谷非鼠 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 2018 09 30 结构体中成员变量地址是连续的,结构体用于描述记录。 Create a struct Create a struct pointer Create a struct array Create an union 阅读全文
posted @ 2018-09-30 11:03 谷谷非鼠 阅读(647) 评论(0) 推荐(0) 编辑