I'm using Code::Blocks to write a program in C++. I wonder how I can split my code in different files.
What blocks of code can I have in seperate files? Must it be classes or could it be just a function? What should I name the file as? Must the files be inside the project directory or can I create subdirectories?
Will the different files automatically find functions in other ones? Or do I need some include statement?
You can take class definitions and function declarations and shove them off into header files, but you can't put a function definition in a header under normal circumstances, if at all. I'm no expert on the matter so I'll direct you to an article with a little relevant advice: http://www.cplusplus.com/forum/articles/10627/