I would be really grateful if you could help me!
Some time ago, I created with some friends a tiny web-browser game using JavaScript. One of the main problems that we encountered was the big dimension of the "main" file. So we decided to split the "main" file in multiple code files, for example: Globals.js, where we stored all our global variables, Path.js, where we made different algorithms. And so on.
It was extremely simple to work this way - it gave a feeling of structure. Main.js would freely take every function declared in the other code files. We just had to put the JavaScript files in the same folder with the main.js file, and have a nice looking main() function, nothing else.
Now, I'm using Qt Creator, and I'm working in C++. Of course, there is the main.cpp file, the nucleus to say so. How can I declare functions outside the main.cpp file, so that my main.cpp file looks nice, without clutter, and still be able to access the functions?