Search Results

Search found 2 results on 1 pages for 'reaffer'.

Page 1/1 | 1 

  • Why do we need to include the .h while everything works when including only the .cpp file?

    - by reaffer
    Why do we need to include both the .h and .cpp files , while we can make it works with making just a .cpp file and then including it . For example, Creating a file.h containing declarations, then creating a file.cpp containing definitions and including both on the main.cpp. Or, creating a file.cpp containing declaration/definitions ( no prototypes ) Including it on the main.cpp. Both worked for me , but still can't the difference since i do not have a background on the compiling and linking process .

    Read the article

  • C/C++ : Why do we need to include the .h while everything works when including only the .cpp file?

    - by reaffer
    Hi , Why do we need to include both the .h and .cpp files , while we can make it works with making just a .cpp file and then including it . Case one : Creating a file.h containing declarations . Creating a file.cpp containing definitions . Including both on the main.cpp . Case two : Creating a file.cpp containing declaration/definitions ( no prototypes ) Including it on the main.cpp . Both worked for me , but still can't the difference since i do not have a background on the compiling and linking process .

    Read the article

1