What is the difference between CRect c; and CRect c (); when is CRect a class?
2 answers
This
CRect c;
creates an object CRect
named c
.
This
CRect c();
declares a function with a name c()
that returns an object CRect
. This is an analysis, which is annoying, but not the most unpleasant of them all .
+6
source to share
CRect c;
defines an object
CRect c();
declares that the function returns an object CRect
.
Sometimes people are unaware of the second form and fall into the most nasty parsing.
+6
source to share