How to swap two variables without using a third variable & pointer?
Shital Parab
0
Newbie Poster
Recommended Answers
Jump to PostAny good reason to do that?
Using temporary variable will be much better.
Jump to PostMy guess is you would use the xor operator or use a trick with operator overloading
+=
?
All 5 Replies
Grunt
19
Junior Poster
iamthwee
Grunt
19
Junior Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Salem
5,138
Posting Sage
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.