I know that you can't take two structs (although they have the same type and members) and compare them directly:
struct s {
int foo;
float bar;
} x, y;
...
if (x == y){
...
but there's got to be a easier way to do this than to go through each member comparing them one by one, especially for structs with a large number of members. Perhaps there's a function hidden away in some remote library that someone could let me know about, or if someone knows a way of writng a function that does this, please explain.