Hi Benjamin,
See link http://yosefk.com/c++fqa/ctors.html, "[10.2] Is there any difference between List x; and List x();?" Syntax
TCanvas canvas();
is incorrect and create mistake which hard to figure out, one should use
TCanvas canvas;
instead.
Cheers,
Andrei.
On Fri, Aug 19, 2011 at 8:45 AM, Benjamin Bannier <bbannier_at_gmail.com> wrote:
> Hi Andriy,
>
>> BTW, a correct syntax to create new object of TCanvas is (NB: no
>> parenthesis!)
>
> Could you explain your reasoning? I thought if possible one would rather
> have the TCanvas value-initialized instead of default-initialized.
>
> Benjamin
>
> [1]: http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new/620402#620402
> [2]: http://stackoverflow.com/questions/5610629/difference-between-default-initialize-and-value-initialize/5610655#5610655
>
Received on Fri Aug 19 2011 - 18:32:53 CEST
This archive was generated by hypermail 2.2.0 : Fri Aug 19 2011 - 23:50:01 CEST