11 Dec
2007
11 Dec
'07
7:14 a.m.
Robert Dailey
I'm going to be using this float to default-initialize a construction parameter. For example: struct default_alpha { static const float value = 1.0f; }; class foo { foo( float r, float g, float b, float a = default_alpha::value ); };
You can use constant in namespace scope: namespace default_alpha { static const float value = 1.0f; } HTH, Roman Perepelitsa.