#include #include "bug1.h" using namespace std; // Program declares an object of type Buggy, fills its cells // with sixes, and prints out the array. // This program segfaults when I run it. Your mileage may vary. // Run the program through the debugger to see where the problem occurs // Look at the variables to see if any have unexpected values. // Then try to figure out where the bad values came from. // If looking at the program does not help, run it through the debugger // line by line, checking the value of the variable at each step. // When does the bad value appear? Why? main() { Buggy mare(5); mare.fill(6); mare.print(); }