C++

C++ Compile and Scope – 3 namespace and external variables and class

This post is to deal with the puzzle on the namespace and external variables. Basically, namespace > external variable; external variables can included in namespace; and more than external variable, we can also have external class or struct. sometimes, it is very good to have global class or struct. example codes: #include <iostream>//also and must… Continue reading C++ Compile and Scope – 3 namespace and external variables and class

C++

C++ Complie and Scope – 1

1. C++ Files  Header file (.hpp) often includes: function prototype inline function strut declaration class declaration template declaration #define & const Source file (.cpp) often includes: function definition related to what are included in the header file function definition  that call the above functions   Never use #include to include the source file because this… Continue reading C++ Complie and Scope – 1