memory deallocation1098 (7/25/2003 11:07:41 AM) Hi there, I've written a function that 'converts' a structure of type timeval to a c-string: char *tv2Str(struct timeval tvX) { char caStr[20]; char *cpResult; sprintf(caStr, "%ld.%ld... Cornel
'this' in constructor initializer lists: FAQ [10.7] vs. ISO/IEC 14882 9.3.22167 (7/21/2003 12:27:18 PM) I'm sorry if this point has been addressed already. I couldn't find anything on point with a Google search. FAQ [10.7] says the this pointer can be used in initialization lists ("if you are careful.") However,... Jonathan
array of vector!2104 (7/23/2003 11:36:03 PM) I have a fixed array of vectors like: vector a_vStr[10]; Then I grow each vector item and use it later. Everything works fine but I am curious about following potential problem. When we grow a vector... faridt
Generic bitmask operators for enumeration types5265 (7/18/2003 11:56:24 AM) Hello! Although enumeration types used at bitmasks can be substituted by std::bitset in many cases, there is one mentionable advantage of enums versus std::bitset: The first ones are much more typesave and the... Daniel
new fstream isn't a weirdo, is it?6603 (7/16/2003 8:45:08 PM) Hi all, I got a 'problem' with the following code (using STL): ifstream * f = new ifstream("filename.bmp", ios_base::binary); It would create the object (f is different from NULL), but it wouldn't pass the p... hhcalderon
How do I do this? (Construction of classes)0116 (7/26/2003 1:08:50 PM) Ok, I get the picture. Thatnks evetyone for all the input. :-) Now that I know that this cannot be done, I need to know how to accomplish this problem that I'm faced with: The set is something like this: I ... Dhruv
Member function binders5114 (7/23/2003 11:16:50 PM) Hello A very common case is to create a function object for a member function, like this: X x; ... bind1st(mem_fun(&X::foo), &x) ... (or something similar using boost::bind). How about simplifying this com... David
How to multithread intrusive reference counting7197 (7/23/2003 11:28:22 AM) I have an implementation of an example of my attempt to implement intrusive reference counting and copy-on-write behavior, derived from Andrei and Meyers versions of intrusive reference counting. I am looking ... john
STL and over 2GB memory1393 (7/18/2003 2:55:38 AM) Hi, Does STL work on a 32-bit machine when a process's total memory is over 2GB? E.g., a Pentium allows the process memory to be as large as 3GB. Are there any other C++ problems that I ought to know about? ... W
std::vector template bloat ? the effective c++ way ?35121 (7/2/2003 5:03:08 PM) I read Effective c++ Item 42 : using private inheritance judicioulsy In this item, Scott Meyers describes a GenericStack base class which implementation manipulates void* pointers. Then , a derived template c... Gregory