Best way to use a derived member as a template parameter to a base488 (8/14/2008 7:28:32 PM) comp.lang.c++ What I want to do (and can't...) is Template class base { // whatever } class derived: public base { Enum myVals { // this isn't relevant either } } ....so that I can have a function in the base that t... Andy
Correct syntax for a friend function of a template class070 (3/25/2008 8:38:07 PM) comp.lang.c++ We've had code similar to this in our project for ages: template class Test { public: Test(T Value): Datum(Value) {}; private: T Datum; template friend bool operator==(Test left, Test right); }; templ... Andy
dynamic_cast is ugly!251165 (3/5/2008 11:05:25 PM) comp.lang.c++ How many times have you written someType* var = dynamic_cast(someOtherPtr); and wondered WTH you have to quote the type twice? So I built this: template class AutoCastProxy { public: AutoCastProxy(T obje... Andy
How to avoid?1251 (7/19/2008 8:22:13 PM) comp.lang.c++ class A; A *a = new A; A *b, *c; b= a; c= b; delete a; delete b; delete c; This is dangrous..can any one give the solution to avoid multipl delete?? 1) Make it NULL after delete 2) Any other solution????... doublemaster007(85)
Enumeration of map elements (Standard Template Library)357 (8/14/2008 11:22:51 PM) comp.lang.c++ Hi, This question concerns the STL template class called map. Does the order of enumeration change when the keys are NOT modified, but the values ARE? Does anyone know if this behaviour is standardised in an... DoB1(2)
accuracy when comparing doubles5550 (1/5/2009 11:20:43 PM) comp.lang.c++ I am writing image processing code for a university project. When I work with numbers (doubles), is it safe to assume that; a) simple arithmetic is accurate to 15 decimal places, always b) boolean comparisons ... vminch(20)
An addition to C++ FAQs1156 (1/6/2009 4:31:30 AM) comp.lang.c++ Hello, I searched the C++ FAQs but did not find any question related to finding on-line reference to C++ Std. Library. Searching the archives of this group told me of these links: http://www.dinkumwar... sunrise2(598)
Non-strictly Weak Sorting using STL?3550 (1/8/2009 3:38:29 PM) comp.lang.c++ Hello, I am interesting in performing a non-strictly weak sorting of a vector of objects. Specifically, I wish to sort these objects by a double field unless they are equal in which case I wish to sort them ba... donovan.parks(12)
Securely Erasing Memory1649 (1/9/2009 2:09:42 AM) comp.lang.c++ Hi, Say i have: secureclass *secure = new secureclass(); // has sensitive stuff in Now i want to securely delete the instance and all the classes member variables, I take it the 'delete' keyword will just de... jecheney(25)
Windows long path converts to "******~*" format, WHY??349 (1/23/2009 12:49:25 AM) comp.lang.c++ Hi Fellows, I have a program which does checking audio files in folders recursively. An interesting thing about this program is that it printed out the full path of files not in FULL format. e.g. A file's loca... needpassion(48)