I have a header file that declares some fields as private, I then have a class that I need to compare two of the objects' information for equality but neither of them are the calling objects. I cannot alter the header file. How would I go about comparing private data fields? I will enter a brief bit of code for clarity.
Thank You.
Code:
// Header File
// stuff.h
class stuff
{
private:
int* arr[20];
int size;
};
bool equal (const stuff& a, const stuff& b);
// Class File
// stuff.cpp
#include "stuff.h"
stuff::stuff()
{
size = 0;
}
bool equal (const stuff& a, const stuff& b)
{
/*
Where I cannot figure out how to compare the two objects for equality due to private fields in the header
*/
}