operator overloading

Joined
May 18, 2011
Messages
1
Reaction score
0
hi,:lol:
I have added a special hardware to my cpu and now I want to overload * for double type.
usually [ double operator*(double, double) ] does not work because double is a predefined system type.
changing all of code manually is not a good way for me so I want to find an automatic way.
first solution I tried was to define a class with one double variable inside. then overload * for that class, but it is not good because it has a lot of timing overhead , moreover I should carefully change all of my code to replace double with new type.

is there any way to overload * operator for type of Double? can macros help me ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top