Skip to main content
gamedev.net
🔒 Locked

slicing the code

Started by CoderTCD Feb 5, 2004 at 4:48 AM 2 replies 350+ views
Original Post
CoderTCD
CoderTCD
I have a project that have about 4500 lines of code and most of the code is in one c file. it became a torture for me to compile it. even I change a line it takes so much time to compile the file for my celeron 500. does seperating the classes into different files help me gain some time? what should I care when seperating the files effectively?
Willm
Willm
If you split your file up un to smaller c files, the compiler only needs to re-compile the files that have edited.

Try to use smaller files with some sensible functional grouping. Avoid including headers in other headers, if you can.

[edited by - willm on February 5, 2004 5:55:45 AM]
Qw3r7yU10p!
Qw3r7yU10p!
If you have functions that operate on a certain data structure then group them together into their own .c file. It will reflect the design abstraction. ''This .c file is for manipulating data of this type''

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.