Auto keyword and when to use it

QueenSvetlana svetlanalilyrosemond at gmail.com
Tue Aug 21 18:22:42 UTC 2018


On Monday, 20 August 2018 at 17:55:11 UTC, JN wrote:
> class Foo
> {
>     auto bar;
> }
>
> because now the compiler doesn't know what type 'bar' is 
> supposed to be.

Just to clarify, even if I set bar in the constructor, I can't 
declare it with auto first, correct? I would have to declare a 
specific type?



More information about the Digitalmars-d-learn mailing list