Hello Everybody
I Have A Question .

Suppose That We Have This Class :

/////////////////////////////////////////////////////////////////////////////
class StringClass
{
public:
...
void someProcessing( );
...
StringClass& operator=(const StringClass& rtSide);
...
private:
char *a;//Dynamic array for characters in the string
int capacity;//size of dynamic array a
int length;//Number of characters in a
};


/////////////////////////////////////////////////////////////////////////////

In Line That I Overload "=" , Why We Use " & " In Two Place :
1 - After Return Type Of Function ( After StringClass ).
2 - In Argument Of Function .

Those are references. They're basically like self-dereferencing pointers.
I suggest looking them up in your C++ book.

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.