The only difference between structures and classes in C++ is that structures have public access by default and classes have private access by default. Otherwise they're exactly the same. In C the best you can get is pointers to functions.
Code:
#include <stdio.h>
typedef struct A {
int x;
void (*set)(struct A *, int);
void (*print)(struct A);
} A;
void set(A *self, int x)
{
self->x = x;
}
void print(A self)
{
printf("%d\n", self.x);
}
int main(void)
{
A obj = {10, set, print};
obj.print(obj);
obj.set(&obj, 20);
obj.print(obj);
}