- Sep 25, 2018
I am not familiar with cpp or c, but have experience with typed languages. Cpp has enough quirks to make me confused.
There are things like int n = 0 retaining its visibility outside for loop (in first for loop n is declared as int, in next loop n is assign 0 without declaring its type), and things like variable like variable being declared as static without type, but the same variable getting declared as int (Numprotraits in ZSPortrait.h and cpp).
I am also confused with operator method in things.h and cpp. First one is declared as bool, another is not declared as any type.
bool Thing:perator == (Thing &ThingOne) //returns bool
Thing:perator = (Thing &OtherThing) //doesnt return anything, but does some memcpy.
then this happens in things.h:
operator = (Thing& otherThing); //assignment operator
bool operator == (Thing& ThingOne);
I presume its overloading assignment for a class?
it should be like Thing& Thing:perator= (Thing &OtherThing)
Thing& operator = (Thing& otherThing)
Interesting stuff. Not sure if it wont break other code.