Fighting compiler - experienced programmer but D novice

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 2 20:29:26 PDT 2014


On Tue, Jun 03, 2014 at 03:17:09AM +0000, Charles Parker via Digitalmars-d-learn wrote:
> ./graph_structures.d(124): Error: class graph_structures.node(D,
> E) is used as a type
> 
> I have no idea what this means:(

It usually means you tried to use an uninstantiated template as a type.


[...]
>      auto fee = new node(string, u_edge)("Suck Moose", 1);
[...]

You're missing the compile-time argument "!" operator; this line should
be written as:

      auto fee = new node!(string, u_edge)("Suck Moose", 1);

Hope this helps.


T

-- 
Too many people have open minds but closed eyes.


More information about the Digitalmars-d-learn mailing list