I've got a class int32
, and it is set up in a way that it can essentially be interfaced with as an int
(operator overloads), but there's one part I don't get.
int32 i32 = 100; // Works
int i = 200; // Works
i32 += 10; // Works
i32 -= 10; // Works, i32 = 100 right now
i = i32; // Doesn't work
What operator would I need to overload to achieve referencing i32 returning it's stored value, in this case, 100 (or how else could it be done)?
int32
's source?i32
is not ncessary. You have to show enough code to show why you think it should work.int
type.