As zeeshan said compare each member of the structure.
Code:
/* Structure one greater than struct two */
int gt(struct name* one, struct name* two);
/* struct two equal to struct one */
int eq(struct name* one, struct name* two);
/* etc..*/
struct name {
int a;
char b;
};
int main() {
struct name x,y;
x.a = 12;
y.a = 12;
x.b = 'x';
y.b = 'y';
if ( eq(&x, &y) ) {
printf("There Equal\n");
} else {
puts("Not Equal");
}
return 0;
}
int eq(struct name* one, struct name* two) {
return (*one.a == *two.a && *one.b == *two.b);
}
Hope this helps
kwigibo