23

#include "somefile.c"

My teacher: "Including a .c file instead a .h header is a mortal sin."

This was long ago, so I believe gcc has already forgiven me.

Comments
  • 0
    I always do this, I don't see the problem? Is it bad practice?
  • 2
    @olback yes .c is internal implementation stuff that you might want to hide, .h is "public api" that's you want other files to use. I barely have any experience with C, so wait for someone more experienced. I know @froddyswags has C experience? Not sure spelled his username correctly.
Add Comment