|
First
|
Prev |
Next
|
Last
Pages: 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
The D Programming Language Hello folks, I am not sure if this was brought up before, but this language is quite interesting when compared to C++ (and others such as C, C#, Java): http://www.digitalmars.com/d/index.html The comparison: http://www.digitalmars.com/d/comparison.html -- [ See http://www.gotw.ca/resources/clcm.ht... 27 Dec 2006 16:00
Polymorphic delete and iterators Say I have a map<key,MyObject*> myMap; and I add to it: myMap[1] = new MyObjectA(..); myMap[2] = new MyObjectB(..); myMap[3] = new MyObjectC(..); presume that 'MyObjectX' is a subclass of MyObject -- and and now I do: map<key,MyObject*>::iterator itr; for(itr = objects.begin(); itr != objects.end(); ++... 20 Nov 2006 11:52
deallocation on explicit destructor call? A bit silly question asked out of curiosity; If you explicity call the destructor on an auto object. Does the memeory for the object get deallocated at once, or does the memory get deallocated once the object scopes out as normal? Regards Patrik -- [ See http://www.gotw.ca/resources/clcm.htm for info... 17 Nov 2006 05:41
how can operator new overrun memory?! I am running bounds checker on my dll and it keeps telling me that a new operator I am executing is "Overrun Detected During Execution: In block 0x0A696010 (720) allocated by global_operator_new." How on earth does new overwrite memory? I don't ever supply the new operator with memory to step on! Here is the ... 19 Nov 2006 18:28
using vector to encapulate a tree - non const copy constructors Repost as the original (13th Oct) did not appear on the site. Hi, I have a problem with the way some implimentations of vector and other stl containers refuse to use non-const contructors. My question is - is the way they function the correct interpretation of the standard - and if so why. MOTIVATION The f... 4 Dec 2006 11:00
template no-match I made a functor that outputs a custom-formatted string given a pair as input: class pair2string { public: pair2string() : _sep(" => ") {} pair2string(const string& sep_) : _sep(sep_) {} template <typename F, typename S> string operator()(pair<F,S>& p_) const { ostringstream oss; ... 15 Nov 2006 17:16
iterator facade I am currently implementing iterator_facade based on N1641, and I have noticed a couple of oddities. iterator_facade has two operator+ and two operator-. One operator- is a member; the other three are non-members. Is there any reason for this? Yechezkel Mett -- [ See http://www.gotw.ca/resources/clcm.... 16 Nov 2006 05:57
What's wrong with this snippet? Hi, any body can tell me what's wrong with following code? Is there memory leak occured? class ABC { char *p; public: ABC() { p = (char*)malloc(50); } ~ABC() { free(p); } }; void main() { ABC *pabc = new ABC; ABC abc; delete pabc; } -- [ See http://www.gotw.ca/resources/cl... 15 Nov 2006 11:59
Member function pointer types / values Question 1: --------------- Can an instance of a member function pointer be "converted" into a type which reflects that pointer? Equally, is there a type_of mechanism for member function pointers? I want a traits type for member function pointers that works like: memfun_traits<&object::member>::type ret = o... 6 Nov 2006 03:27
Caseless String Hello, I must decide relatively quickly whether to add a caseless string class to my library. I envision such a string would relax the signifcance of case when used as an argument in a boolean operation: String<char> s1 = "c++"; Caseless_String<char> s2 = "C++"; s1 == s1; // true - bool operator == (const ... 25 Nov 2006 01:25 |