Is there a way to initialize a non-assigned structure declaration (or is it a definition)?
Era Scarecrow
rtcvb32 at yahoo.com
Fri Nov 9 18:07:30 PST 2012
On Friday, 9 November 2012 at 23:57:35 UTC, Ali Çehreli wrote:
> On 11/09/2012 03:35 PM, Too Embarrassed To Say wrote:
>> // Parameterized!(int, double, bool, char) p5(93, 5.694, true,
>> 'K');
>> // Error: found 'p5' when expecting ';' following statement
>
> Ok, that is strange. I don't understand what "statement" the
> compiler sees there.
Let's alias the above to simplify...
alias Parameterized!(int,double,bool,char) Param;
Param p5(93, 5.694, true, 'K');
As it looks, it appears you are either confusing it with a
function declaration, or it's trying to call p5(doesn't exist),
or pre-initialize p5 the wrong way.
More information about the Digitalmars-d-learn
mailing list