First  |  Prev |  Next  |  Last
Pages: 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
Article: On Iteration
On 11 Nov, 06:20, Andrei Alexandrescu <SeeWebsiteForEm...(a)> wrote: I wrote an article that may be of interest on InformIt; it got mentioned on Due to the vagaries of posting time and reddit dynamics, the article didn't stay long on reddit's programming page so it got very few views an... 6 Dec 2009 16:08
Better way to call member function using function pointer?
Hi, Following is isolated code reproducing the issue I encountered while using function pointers: ////////////////////////////////////////////// #include <iostream> #include <string> #include <map> using namespace std; class Sample { public: Sample() { funPtrs["fun1"] = &Sample::fun1; funPtr... 18 Nov 2009 14:35
templates vs inheritance.
Hi Guys, I see that inheritance allows the paradigm of "programming to interface" with ease.A client can store a pointer to abstract base class and invoke operaitons on it without caring about the concrete derived class that pointer points to. Inheritance seems to allow programming to interface naturally because... 18 Nov 2009 05:38
Const and usage during compile time
const int i[] = {10, 12, 18, 20} //The below isn't legal, the text says because the array above being const, it can't be used at compile time, and the error is "error C2057: expected constant expression". It seems (I tried it) it can't be done whether the array above is const or not, the (here float)array size val... 13 Nov 2009 16:37
sizeof: Why parentheses needed when used with data types (when not required with variables)
tohava wrote: On Nov 10, 10:26 am, Seungbeom Kim <musip...(a)> wrote: Consider the compiler saw a stream of tokens: sizeof int * * E It could be sizeof(int *) * E, or sizeof(int) * (* E). (Of course, E of an arithmetic type would make only the former case well-formed, and E of ... 11 Nov 2009 21:21
Virtual inheritance and typedef
Hi, In the book _C++ Templates: The Complete Guide_ (2003), Vandevoorde and Josuttis devote section 16.1 (pages 285-9) to a technique for implementing "Named Template Arguments". The full code is too long to quote, but can be accessed at the book's website:, in t... 16 Nov 2009 10:07
shared_ptr declaration in if-statement ?
Hi all. // With a pointer I can do: if(MyWhatever* pX = get_whatever()) { } However, for this to work with a shared pointer (shared_ptr or scoped_ptr from boost) I have to do: if(shared_ptr<MyWhatever> pX = shared_ptr<MyWhatever>(get_whatever())) { } This is ugly (and presumably could also add some ru... 14 Nov 2009 18:51
Arguement against NULLing a pointer after delete?
I seem to remember reading through the C++ FAQ Lite and reading an arguement against setting a pointer to NULL after delete. Is there such an arguement or did I imagine the whole thing? Thanks Allan -- [ See for info about ] [ comp.lang.c++.moderated. Fi... 14 Nov 2009 04:38
Seeking recommendation on free or cheap C++ compiler
I am not a programmer, but have a technical background, and studied programming quite a few years back, including some classes in C and C+ +. I am seeking to get back up to speed in C++ on a hobby basis, so I'm trying to figure out which compiler to get now. A search on the web reveals lots of compilers, but it's... 28 Nov 2009 22:16
Using Boost.Spirit in production code
I would be interested to know the opinion of this newsgroup on whether it is sensible using Boost.Spirit in production code. In a project I'm working on, I'm likely to need to produce three non-trivial C++ parsers: one for a network protocol quite similar in structure to HTTP, one for a expression parser (not unli... 23 Nov 2009 07:23
First  |  Prev |  Next  |  Last
Pages: 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61