Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Question about operator overloading

$
0
0
Hello,

I have a question about a particular code inside the overloading function where the variable BOOL bOk = operator << (dwSize);. I would just like to know how it actually work and changes does this statement do.

Here is the full code:
template<typename TYPE>
BOOL bRoom::operator >> ( std::vector<TYPE> &stdVALUE )
{
	BOOL bOK(FALSE);
	DWORD dwSize(0);

	stdVALUE.clear();

	bOK = operator >> ( dwSize );
	if ( !bOK )					return FALSE;
	
	if ( dwSize==0 )			return TRUE;

	stdVALUE.reserve(dwSize);

	return TRUE;
}



I'm not sure if there is somebody that have already posted that here as I don't have any idea what it is called and do. If there is a name for that particular statement, I would love to know it.

Thanks in advance.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>