in reply to perl vs. C++ operators
You want overload; its doc is quite good so I am not going to attempt a rehashed synopsis.
I recommend you take a good look at PDL before you go ahead with what you're doing though.