Can I define a function inside a C structure?

No, you cannot define a function within a struct in C. You can have a function pointer in a struct though but having a function pointer is very different from a member function in C++, namely there is no implicit this pointer to the containing struct instance. Contrived example (online demo http://ideone.com/kyHlQ):