Write Programs for Debugging

You can make your programs easier to debug by following these simple guidelines:

      // Can't see the substrings in this one
      if (StrA.subString(x,y)==StrB.subString(m,n)) dups++;

      // Can see the substrings here
      IString SubA=StrA.subString(x,y);
      IString SubB=StrB.subString(m,n)
      if (SubA==SubB) dups++;

To be able to debug your programs at the level of source code statements, you must specify C++ compiler options that generate debug information, and in some cases you must specify options that enable the debugger to work properly with your code.




C++ Compiler Options