List Info

Thread: how to declare a vector at header file?




how to declare a vector at header file?
user name
2006-05-23 10:12:46
Hi
 ;
How can I declare a vector at the header of a class?
I tried to write ;in a header file:

ublas::vector<

float> cov(3);

but I got the following error:

simple_env.H:25: error: expected identifier before numeric constant
simple_env.H:25: error: expected `,' or `...' before numeric constant
simple_env.H:25: error: ISO C++ forbids declaration of `parameter' with no type

I am using Cygwin platform, and using g++ as my compiler.

Thanks

Dvir

how to declare a vector at header file?
user name
2006-05-23 10:19:45
Am Dienstag, 23. Mai 2006 12:12 schrieb dvir schirman:
> Hi
>
> How can I declare a vector at the header of a class?
> I tried to write in a header file:
>
> ublas::vector<float> cov(3);
>
> but I got the following error:
>
> simple_env.H:25: error: expected identifier before
numeric constant
> simple_env.H:25: error: expected `,' or `...' before
numeric constant
> simple_env.H:25: error: ISO C++ forbids declaration of
`parameter'
> with no type

Did you include all ublas headers before the above
declaration? Was cov 
already used at another place?

Please give more information (or the full header) in order
to get help.

mfg
Gunter
_______________________________________________
ublas mailing list
ublaslists.boost.org
htt
p://lists.boost.org/mailman/listinfo.cgi/ublas
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )