[prev] 99 [next]

Common Mistakes

Warning! Warning! Warning! Warning!

  • Never #include an ADT implementation file

    #include "stack.c"     // correct is: #include "stack.h"
    

  • Do not try to access struct details in a client

    #include "stack.h"
    ...
    stack S = newStack();
    ...
    if (S->height == 0) {   // correct is: StackIsEmpty(S)  
    ...