On Sun, Feb 28, 2010 at 12:57 AM, Olufowobi Lawal <[email protected]>wrote:
>
>
> I need to achieve class constant for integral type
>
> ________________________________
>
> class Ball{
> static const int radius = 10;
> };
>
> I have tried,
> class Ball
> {
> const static double radius ;
>
> };
> Ball::radius = 10.0;
>
> ________________________________
>
> I get an "unresolved external symbol" linker error.
>
>
What you need is the storage declaration. Put this in your cpp file:
double Ball::radius;
--
Tamas Marki
[Non-text portions of this message have been removed]