What you can do in your constructor is allocate memory for that pointer, and in the destructor release that memory. That way, you can use the pointer safely.
And the proper syntax is
*(foo[0].fp) = 1.3f;
. If that doesn't work, then something else might be wrong. Give us the compile/link error if that's what you are getting.EDIT: Bah, you beat me
quote:Ok I got this syntax to work finally. But why *(stuff) for a syntax.
It makes the code look clearer.
quote:THis works also.
Yeah, operator precedence makes it work out.
[edited by - Zipster on January 30, 2003 7:24:28 PM]