typedef and operator overloading in C
Posted
by jocapco
on Stack Overflow
See other posts from Stack Overflow
or by jocapco
Published on 2010-05-16T17:17:44Z
Indexed on
2010/05/16
17:20 UTC
Read the original article
Hit count: 131
operator-overloading
Suppose I typedef an integer or integer array or any known type:
typedef int int2
Then I overload operator * for int2 pairs, now if I initialize variables a and b as int. Then will my * between a and b be the overloaded * ?
How do I achieve overloading an int and yet also use * for int the way they are. Should I create a new type?
© Stack Overflow or respective owner