mambokn...@gmail.com writes:

> With g++ v.4.3.2 instead I get the reported error.

g++ is correct.


> I would thankfully appreciate any help.
>
> volcalc.cpp:26: error: template argument for 'template<class _Alloc>
> class std::allocator' uses local type 'main(int, char**)::series'
> volcalc.cpp:26: error:   trying to instantiate 'template<class _Alloc>
> class std::allocator'
> volcalc.cpp:26: error: template argument 2 is invalid
> volcalc.cpp:66: error: request for member 'resize' in 'alldata', which
> is of non-class type 'int'
>
> int main(int argc, char *argv[])
> {
>         struct series {
>                 ....
>         };

series is a local name and therefore has no linkage.


>         int nr;
> ....
>         vector<series> alldata;   // line 26

Currently, template parameters have to have external linkage. This may
change in future versions of the ISO C++ Standard.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to