cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
operator overloading
operator overloading
Aug 20, 2014 at 9:09pm UTC
danicpp
(116)
type operator * (int x) const;
now the const word here is telling about whom????
x is const OR the driving object is const ????
Aug 20, 2014 at 9:34pm UTC
asus1575
(12)
The member variables of the object where the operator is overloaded are const in the operator* function scope. If it's a non-member function that's wrong.
Asus.
Topic archived. No new replies allowed.