Answers for "operator ++ overloading c++"

C++
-1

operator ++ overloading c++

class Point
{
public:
	Point& operator++() { ... }		// prefix
	Point operator++(int) { ... }	// postfix
  	friend Point& operator++(Point &p);			// friend prefix
  	friend Point operator++(Point &p, int);		// friend postfix
  	// in Microsoft Docs written "friend Point& operator++(Point &p, int);"
};
Posted by: Guest on August-15-2020

Browse Popular Code Answers by Language