摘要: 1. Variable: int a ; This is not only a Declaration, but also a Definition. Since it is a defintion, it is must "Define only once". example If you wri 阅读全文
posted @ 2016-06-03 19:51 steven_xiu 阅读(184) 评论(0) 推荐(0) 编辑
摘要: ah.h void setb();void setb(); void setb(); void setb(); void setb(); void setb(); void setb(); ah.cpp #include"ah.h" #include<iostream> using namespac 阅读全文
posted @ 2016-06-03 19:36 steven_xiu 阅读(138) 评论(0) 推荐(0) 编辑
摘要: example ah.h #ifndef _AH_H #define _AH_H int a=5; #endif calla.cpp #include"ah.h" void seta() { a=2; } main #include"ah.h" #include<iostream> void set 阅读全文
posted @ 2016-06-03 17:45 steven_xiu 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 1. Compile only checks with Declaration; 2. Compile do not checks with Definition; 3. Include means All things packed will rewritten here; 4. "static" 阅读全文
posted @ 2016-06-03 16:23 steven_xiu 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include <xxx.xxx>该指令指示编译器将xxx.xxx文件的全部内容插入此处。若用<>括起文件则在系统的INCLUDE目录中寻找文件,若用" "括起文件则在当前目录寻找文件。一般来说,该文件是后缀名为"h"或"cpp"的头文件。 注意:<>不会在当前目录下搜索头文件,如果我们不用<>而 阅读全文
posted @ 2016-06-03 16:17 steven_xiu 阅读(262) 评论(0) 推荐(0) 编辑