+ 1

why do we need separate files for headers and source code?

7th Dec 2016, 11:51 PM
Edwin
5 Antworten
+ 1
talk about OOP! Thanj you! :)
7th Dec 2016, 11:58 PM
Edwin
0
Imagine a scenario where you being a game developer or any programmer at all using C++ had to code for a game, a program, an app, but then discovered you needed some files to include functionality to the screen. Functionality for the mouse. Not only would your source code be heavy but it would consume developmental time. So the general schema is to separate functionality from content, content from styling and so on.
7th Dec 2016, 11:57 PM
JENN
JENN - avatar
0
Try to do a project in one file and you'll see why ;)
8th Dec 2016, 12:35 AM
Dominik Magdaleński
Dominik Magdaleński - avatar
0
Imagine a main contain 3000 line of code you'll be capable to read It or to modify it
8th Dec 2016, 12:39 AM
Brehima Coulibaly
Brehima Coulibaly - avatar
0
The only reason is tidiness. It keeps the program neat looking so that it's easier to search for the source of bugs in your code. Also makes your code run faster, and makes it easier to add or delete features.
8th Dec 2016, 8:13 AM
Eddy