C++基本知识
——————————
C++基本组成部分
知识点总结:
一个C++程序需要3个文件。比如:a.cpp、a.h、main.cpp
#head
- In C++,separated .h and .cpp files are used to define one class.
- Class declaration(申明) and prototypes in that class are in the header file(.h)
- All the bodies of these functions are in the source file(.cpp)
- header = interface
- 任何一个.h和.cpp文件都是成对出现
- .h为declarations,.cpp是definitions
- .cpp中会#include<.h>