I recently moved from Java for C++ but now when I am writing my application I\'m not interested in writing everything of the code in the main function I want in main functio
In C/C++ you have header files (*.H). There you declare your functions/classes. So for example you will have to #include "second.h" to your main.cpp file.
In second.h you just declare like this void yourFunction();
In second.cpp you implement it like
void yourFunction() {
doSomethng();
}
Don't forget to #include "second.h" also in the beginning of second.cpp
Hope this helps:)