Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

How is more efficient ?

$
0
0

How is more efficient to write:

CPoint ptScroll(GetScrollPosition());

or

CPoint ptScroll = GetScrollPosition();

?

In the first case, as far as I know, is executing only a variant of CPoint constructor, but in the second case is executing CPoint constructorand assignment operator ... I'm right ?



Viewing all articles
Browse latest Browse all 15302

Trending Articles