1. Wednesday, 9/23/2009 Notes

    In lecture today, we covered the following topics:

    • an overview of the GDB gnu-debugging tool.  A short manual of the basic keywords/functionality has been added to the left hand toolbar.
    • Discussion of the notion of char* C-strings (char arrays ended with a null character ‘\0’)
    • Writing two functions that deal with C-strings - string length (strlen) and string equal
    • Noting the useful idea - when dealing with memory-addressed data, a fast easy first check for equality is to test whether the pointers are pointing to the same place.

    Example programs we saw:

    • nullTerminatedCharArray.cpp (example programs to work with null terminated char arrays as strings - includes a length and an equals function; multiple version of the functions are in the file, including some of the ones we arrived at on the board in class today)