CMPSC 16 Lecture Notes - Lecture 6: Object File, Include Directive, Machine Code
Document Summary
Source code goes through the compiler to become an executable (program in machine code; data in binary); runtime is on the hardware. Source code: text file stored on computers hard disk or some secondary storage. Other libraries can be included in a program. Ld (linkage editor): merges one or more object files with the relevant libraries to produce a single executable. Write the test functions before actually writing all the code inside. Stub: an empty shell of the function that is going to be written. Can just set the return value to anything so that the program will compile without errors. Create test cases one at a time for code designing so that the problem is limited to just one at a time. Header file: where the function declaration go; not a . cpp file but actually a . h file. Just have to use the line #include filename " in order to use the function.