An overview of the c++ programming environment, covering the phases of c++ programs (edit, preprocess, compile, link, load, and execute), editing techniques, compilation process with compiler options and conditional compilation, linking with linker options, and debugging methods through debuggers and outputs. It also includes common compiler and linker errors.
Download C++ Programming Environment: Phases, Editing, Compilation, Linking, and Debugging and more Slides Computer Programming in PDF only on Docsity!
CP Lecture 4Fall 2011
September 23, 2011Ghufran Ahmed
2
C++ Development Environment• Microsoft vs Linux• Visual C++ vs Borland C++ vs gcc• IDE vs command line
4
Editing
5
Compilation
• Compiler options• Conditional compilation
7
Debugging
• Through debugger• Through outputs
8
Compiler Errors
• Warnings• Errors• Fatal errors
10
C++ Program Structure
•^ Head area•^ Include area•^ Prototype definitions•^ Externs•^ Constants area•^ Global variable area•^ Main function•^ Other functions
11
Program Style
• Indenting• Commenting• Naming constants
13
Some Exercises
• Put an extra space between the < and theiostream.h file name• Omit one of the < or > symbols in theinclude directive• Omit the int from int main()• Omit or misspell the word main• Omit one of the(), then omit both the ()