cstructequality

How do you compare structs for equality in C?


How do you compare two instances of structs for equality in standard C?


Solution

  • C provides no language facilities to do this - you have to do it yourself and compare each structure member by member.