I'm working on a relatively large project that is split into multiple files of source code/.cpp files (for better readability).
The overall code should be in compliance with the standards, but I'm afraid I'm not familiar with the C++ header files.
Note that I do the following in front of main():
Then, I made a .h file, myHeader.h, that looks like this:Code:#include <iostream> #include <math.h> #include <vector> #include "one.cpp" #include "two.cpp" #include "three.cpp" int main() { .... }
In the main file, I only have "#include "myHeader.h" before the main(). Is this fine andCode:#ifndef MYHEADER_H #define MYHEADER_H #include <iostream> #include <math.h> #include <vector> #include "one.cpp" #include "two.cpp" #include "three.cpp #endif
in compliance with the standards?