10 Dec
2007
10 Dec
'07
6:21 p.m.
Robert Dailey wrote:
Is there a way I can define constant floats within class scope like you can with integral values? I was hoping boost could help in this area. For example:
struct default_alpha { static const float value = 1.0f; };
The above is not legal, of course. Anyone? Thanks. In .h header:
struct default_alpha { static const float value; }; In .cc source file: const float default_alpha::value = 1.0f; Is this answer too simple? -- Dick Hadsell 914-259-6320 Fax: 914-259-6499 Reply-to: hadsell@blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 44 South Broadway, White Plains, NY 10601