+ 2
Source & Header file in C++
can you please provide me an example of the source and header file in c++ (with some details) ? so that I can understand it properly.
1 Antwort
+ 2
The basic idea is that there is the interface (header file) which contains all of the methods and class declarations, the implementation file contains all of the definitions of the methods, and the source file contains the application of the class and methods. The purpose is that you can reuse the interface and implementation files as they are with any application file.
Below are some examples. The first contains five files (2 interfaces, 2 implementations, 1 source) and the second and third contain 1 interface, 1 implementation, and 1 source. If you like them, give them a like.
https://code.sololearn.com/cp9GtXD6JamP/#cpp
https://code.sololearn.com/c1KHFBUD4K3r/#cpp
https://code.sololearn.com/c6exQ5LVO4ds/#cpp