The usual practice when writing C++ applications is to put the class declarations in a header file, with .h extension, and the function definitions in a source file, with .cpp extension.View more random threads:
- C++ Random crash 2011
- Consitional Operator in C++ July 2011
- A partial specialization may inherit from an ordinary class
- why Hoffman tree is not an AVL Tree?
- cascading operator overloading in c++ 2011
- in abstract classes where abject donot extensiate,why we...
- what is overriding in c++
- Explain the difference between state and attribute in c++...
- what is anonymous in c 2011
- Sir please clear i++ and i-- terms.What is there function
The header file (.h) contains function prototypes, so another programmer can see what methods the class responds to, without having to worry about how the methods are implemented.
Sponsored Links
The source file (.cpp) contains the actual function definitions , placing the detailed code in a location isolated from the declarations in the header.
The cpp file has a #included statement that refers to the corresponding .h file.
There are currently 1 users browsing this thread. (0 members and 1 guests)