Hi, I need some help with operator overloading. If you can give me at least some reference material, that would be great...
What I want to do is define some custom structures, sort of like this;
struct My_Type
{
int one;
int two;
};
And then I want the to make the following code make sense:
(this is all examples)
My_Type a, b, c;
c = a + b;
cout << c;
c = a / b;
cout << c;
c = a * b;
cout << c;
I've already read that this is possible, with operator overloading, but I don't know how to do it... In the end I want to define my own data type
thanks for any kind of help.
[Edited by - X-ed_out on July 25, 2007 9:45:53 AM]