I tried the Java-style, but it no wanted to work. Also, I didn''t think you could use that Class::staticObj notation on private members. And also, doesn''t that only allow me to make a dynamicly created object? You used an int example, but could you do:
int A::privateStaticObject(cnstrParam1, cnstrParam2);
"static" stuff in C++
quote:
could you do:
int A::privateStaticObject(cnstrParam1, cnstrParam2);
Sure. But that''s an invalid declaration because that''s a function. You could do this, though:
class A{private: static Object my_obj;};Object A::my_obj( /* params */ );
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!
quote: Original post by Tac-Tics
I tried the Java-style, but it no wanted to work.
It doesn''t work in MSVC 6, if that''s what you tried it in.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement