+ 1
C++ source files and headers
If I have too many functions inside my main source file (main.cpp) and I want to put some functions into another source file (other.cpp), then include the headers in both main.cpp and other.cpp, is this better or putting everything in 1 main.cpp is enough? Provided class is forbidden in this project. other.h void myfunction(); other.cpp #include "other.h" void myfunction() { codes } main.cpp #include "other.h" int main() { myfunction(); }
0 Antworten