School's out, and structs were the last thing I learned about in this C++ class I took at NC State. This semester was really about the C in C++. The object-oriented part comes in the spring. But by the time you get around to structs, you will have learned about file streaming, arrays, global constants, [...]
Archives for posts tagged ‘C++’
Debugging C++ code (UNIX)
Friday, 3 October 2008
This assumes you're inside a UNIX terminal window (e.g., PuTTY session to remote UNIX box).
Compile a .cpp source file in the GNU debugger:
g++ -g -Wall -o mysourcefile.out mysourcefile.cpp
Before starting gdb, make sure you're in the same directory as the executable just compiled above. Then call gdb:
add GNU
Then start the gdb debugger:
gdb mysourcefile.out
Things you can do [...]