To best handle large programs with many lines of code, break up the source code files into multiple modules. Each module is compiled and the resulting object code files are linked into a single program. To help the process, use a custom header file that contains all the other includes, definitions, prototypes, and other common program elements.
- [Instructor] If you like, … you can put all 6,000 lines of code … into a single source code file. … A better option, however, is to break up your code … into several source code files or modules. … To show you such a multi-part program would work, … follow along in Code::Blocks. … I'm going to start by creating a new console C language project … and it has to be a project. … Console Application, C language … and I'm going to call this project horserace. … Click Next and I don't need to debug configuration, … so uncheck that box if it's checked. … Click Finish. … Now Code::Blocks automatically gives you … a skeleton main.c function. … We don't need this for this code, … so I'm going to remove it in the project. … Right click on the project title … and we will Add files … from the Exercise Files, all five of 'em here. … Click Open and then Code::Blocks organizes those files … by sources and headers. … I'm going to go ahead and open up each one … into its own tab. … The main function is always where the program starts …
- Working with arrays
- Building a structure
- Creating an array of structures
- Testing characters
- Working with strings in C
- Using pointers to manipulate data
- Manipulating files
- Using command-line arguments
- Working with time functions
Skill Level Intermediate
1. Arrays and Structures
2. Characters and Strings
4. Files and the Operating System
5. The Interesting and Extraordinary
Next steps1m 52s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.