tel me the difference between binary and unary operator
thilinam
0
Light Poster
Recommended Answers
Jump to PostBinary operations are operations between two variables (like a+b, a-b, a^b, a/b etc.).
Unary operations are operations on one variable (a++, a-- ...)
Jump to PostHi,
operator++(int)
andoperator++()
are the post and pre increment signatures respectively.Note that the (int) in the post-increment does not get assigned or used
i.e. you might write…class A { public: A& operator++(int) { // do stuff here; return *this; } };
All 7 Replies
unbeatable0
32
Junior Poster in Training
thilinam
0
Light Poster
StuXYZ
731
Practically a Master Poster
chakram
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
pirbhat.ariya
0
Newbie Poster
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.