Previous Lecture | lect08 Slides | Next Lecture |
Code from lecture
https://github.com/ucsb-cs16-f18-nichols/code-from-class/tree/master/10-23
Under the hood of program compilation and execution
- From high-level programs to machine code
- What are .h, .o and .cpp file?
- What is an execuatble
- Steps in compilation
- Creating object files and linking programs with g++
- Separate compilation with Makefiles read about Makefile
- Compile-time errors
- Linker errors
- Header guards
Topics
Memory
C++ arrays
- C/C++ arrays are like lists in Python and Arrays in Java. We will discuss the differences between these.
- Declaring and initializing arrays in C++
- Tracing code involving arrays
- Array pitfalls: out of bound array access