Sunday, July 12, 2009

C++ commonly used operators?

Do you think there might be a way to directly access commonly used operators, such as the arithmetic operators or the stream operators, with enum types. For example, would overloading these operators be a good solution?

C++ commonly used operators?
I'm not really seeing exactly what you're saying, but the usual use of an overloaded operator is to modify it's normal behavior to account for specialized cases for an object created as a class. An example of this would be an overloaded assignment operator to work with a class that is representing irrational numbers which require a real and irrational portion to be used.





I hope that this definition and example may help you with your question, though I still haven't grasped the intent, I fear. Pivy.


No comments:

Post a Comment