Hi, how do I correctly instantiate a template container? Everywhere I
look they only mention in-place containers, i.e. construction on the
stack like "List<Bla> myList;".
I tried
List<sometype *> * ls = new List(); which complains (with G++ 4):
expected type specifier before List; cannot convert 'int*' to
'sometype*' in assignment; expected ',' or ';' before 'List'.
(btw: List is my own class, in case you're wondering, but I think a
general answer would be just as fine).
I also tried Java syntax:
List<sometype *> * ls = new List<sometype *>();
but it doesn't work either.
I seriously can't comprehend the error message. Yes, the statement
before the initialization ends with a ';'.