We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

overloading << operator with variable args

kalv
kalv asked
on
Medium Priority
247 Views
Last Modified: 2010-04-02
is it possible to overload the insertion operator << with variable number of arguments.It would be very
helpful if someone explains with an example.the MS VC++ compiler does not even allow the declation but why??
thanx
kalyan
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
is it possible to write a member function to overload it,i know to do it as a friend.

Author

Commented:
Alexo,
  if i write it as a friend it takes two args,one for the loperand and the other
for the roperand.but how do you do it as a member function?

Author

Commented:
please explain me with an example to write it as a member function

Author

Commented:
iam ready to give 10 points.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.