Is this problem even possible in C++? It would seem the lack of reflection would make it nearly impossible.
>what are templates
Can't I just recast the object pointers to char * and memcmp the raw memory bytes?
>>56140332
Try it. It's probably the only approach you can take unless you are given specific class to work off of for the problem.
>recursion
Just use reflection and foreach.
>>56140278
If this was c:
int deepEqual(void* a, size_t sizeofa, void* b, size_t sizeofb)
>>56140332
What if one of the properties is a pointer to another object? It'd show unequal even if two object As point to two object Bs that aren't the same object Bs but are equal to each other.
>>56140474
C++ buddy.
>>56140727
The C# VM is written in C++.
>>56140332
lol don't forget to follow nested pointers and then STOP following nested pointers when there's no more to be followed.
OH AND CAST THEM BACK TO POINTER FIRST - that one got me good last tim.