In one of my classes i have an '=' operator that looks like this:
Code:
CBuffer& CBuffer::operator=(const CBuffer& pBuffer);
When i use this in the below code it treats it as a reference, instead of calling the operator"
Code:
void someFunc(CBuffer& pBuff)
{
  CBuffer something = pBuff; //treats it as a reference, rather than calling the overloaded operator.
}
I have to do it like this for it to call the operator:
Code:
void someFunc(CBuffer& pBuff)
{
  CBuffer something;
  something = pBuff;
}
Is there anyway i can make it work how i got it in the first example?