   how to init const objects?
  something like this is normal:const int   gValue1 = 100;    // assignconst myValueObject   gValue2(100);// with constructorbut can we init the const object with a member func?something LIKE this?const std::bitset flag1.set(1);can u use copy constructor? i tried but i cant get it to work... 
  Unless the member function is const and the member variable you''re trying to modify is mutable, you can''t. And doing so completely defeats the purpose of having your object be a constant.However, if the member function you''re calling returns a reference to *this, you can use an unnamed temporary.const Object obj = Object(42).member(42);   [ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ][ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ] ;  i checked, and the two bitset member funcions set() and set(pos,val) do return the ref to *this.however, this doesn't work for me: const std::bitset<axpStatusSize>SF_DUMB = (std::bitset<axpStatusSize>).set(10);i keep getting syntax error "."and if i use this: const std::bitset<axpStatusSize>SF_DUMB = std::bitset<axpStatusSize>.set(10);i get:error C2275: 'std::bitset<64>' : illegal use of this type as an expression [edited by - original vesoljc on July 31, 2003 1:04:53 PM];  You placed the () wrong.typedef std::bitset TYPE;const TYPE SF_DUMB = TYPE().set(10);   [ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ][ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ] [edited by - Fruny on July 31, 2003 1:48:05 PM];  fruny, u just earned ur self a cold beer, tnx 