First  |  Prev |  Next  |  Last
Pages: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
What's the point of passing parameter by value (vs. const ref)
Hi all. When writing new C++ code, what is the point of passing any (input) parameter by value when passing by const reference will just work as well? (Even and especially PODs, I would not do it with a complex type anyway.) (Given that in 90% of the code you will never want to modify the parameter anyway.) ... 24 Jul 2008 15:59
strcpy_s vs strcpy
Hi, I have changed my strcpy to strcpy_s for 2005 project. It's fairly big project and was using strycpy lot of places. The program started corrupting the stack and in turn crashing the application. We have realized that it is due to strcpy_s. We have changes that to strpcy and then it was fine. There are s... 7 Jul 2008 18:41
wrap a buffer as a FILE *
I use a small library (physfs) to read files inside a zip (or a directory if I am in debug). It is a simple and typical virtual filesystem. but there are some other libraries that request a FILE * as input. So, is there any way to wrap an array of memory as an standard FILE? -- [ See http://www.gotw.ca/... 7 Jul 2008 10:25
num_put facet has no 'float' handling
Hi Folks, The standard num_put facet does not directly support floats, only doubles; paraphrasing Jossuttis, "This is no problem because corresponding values of build-in types are promoted to supported types when necessary." Unfortunately, in the course of events, we have come across a need for ... 1 Jul 2008 21:35
ambiguous call to overloaded function
{ This article is multi-posted to [comp.lang.c++]. -mod } I want to overload function to swap two others types, for example, type<T>, T* and so on, but I can't compile the following code at VC 6.0. The compiler says : error C2667: 'swap' : none of 2 overload have a best conversion error C2668: 'swap' : ambigu... 5 Jul 2008 06:24
Comment on my adapter concept
Hello, I'm working on an adapter for a C plugin API. Plugins which are loaded as dynamical libraries are expected to provide a function which fills a struct of function pointers to service routines. Two of these functions are expected to allocate and deallocate the plugins private data. The C-Style "bas... 5 Jul 2008 18:39
Access internal methods in compounds?
Hi all. I would like to implement a hierarchy of classes to print some messages to the screen. At present I would like to use a base class with default behaviour, which then might be overloaded to handle application-specific situations. One relevant scenario is to use some GUI toolkit to print the message in s... 29 Jun 2008 16:14
variable function in a template ?
How do I write a template based on a function ? example: template <function F> class resmap { private: // some private declarations public: void callmyfunc(); }; template <function F>void resmap<F>:: callmyfunc() { // do some stuff temp = F(); // do more stuff } F is like a virtua... 29 Jun 2008 16:14
why are foos like vector<T>::size no duplicate symbols for linker?
On Jun 28, 11:28 am, vl106 <vl...(a)hotmail.com> wrote: { Please confine responses to standard C++ and generic concepts of compilation and linking, i.e. not going overboard in environment-specific discussion. -mod } I have a question concerning the code the compiler generates for template functions. ... 28 Jun 2008 17:48
why are foos like vector<T>::size no duplicate symbols for linker?
{ Please confine responses to standard C++ and generic concepts of compilation and linking, i.e. not going overboard in environment-specific discussion. -mod } I have a question concerning the code the compiler generates for template functions. - why does linker not complain about ctor being there 2-times? - ... 28 Jun 2008 18:50
First  |  Prev |  Next  |  Last
Pages: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48