To begin developing the createUnsorted.c program, first copy the getoptFiles.cfile to the createUnsorted.c file. We will henceforth modify this file.
Open createUnsorted and, after the const int stringMax declaration, add the following function prototypes:
void usage( char* cmd );
int getName( FILE* inFileDesc , char* pStr );
voidputName( char* nameStr ,FILE* outFileDesc );
int trimStr( char* pString );
In this chapter, for each program, we will follow the following general program organization:
- #include files
- Constant declarations
- struct and enum declarations
- Function prototypes
- main()
- Function definitions (these generally appear after main() in the same order as their prototype declarations)
This is merely a convention. In the next chapter, we will learn about a multi-file program organization that will help to...