First  |  Prev |  Next  |  Last
Pages: 50 51 52 53 54 55 56 57 58 59 60 61
Base Class undefined but header right above it!
I have the following #include "Parent.h" class ChildA : public Parent { SomeOtherClass klass; } and I get error C2504: 'Parent ' : base class undefined It happens as soon as I include the SomeOtherClass declaration which is #included in "Parent.h" the error occurs. Now, more informat... 11 Oct 2006 10:37
fgets() vs std::getline() performance
Wow ! I just used two different file IO methods and the performance difference was huge. Is there something that I am doing wrong? or is fgets() just that much faster than getline()? Here's the code I used : // SLOOOOOOW // ----------------- std::string line; std::ifstream in(filename.c_str()); ... 23 Oct 2006 01:37
Sanity check: public/private
Carlos Moreno wrote: 1) private is only used as class-member access specifier According to the holly standard, the memory layout for variables separated by different access specifiers is implementation issue. Therefore if you change private to public, the member layout maybe different. 2) private ... 20 Sep 2006 12:01
Callback-related libraries and terminology
I've been trying to make sense of Boost.Signals, especially in terms of some other libraries I'm familiar with. Part of the problem is terminology, I think, e.g., callbacks, slots, and delegates (as in .NET, but also as used by some for bound member function pointers (e.g., 2 Sep 2006 11:33
bind guard ?
I'd like to have an arbitrary function with arguments called when execution leaves a function, either normally or because of an exception. I assumed there was a boost structure, not unlike a semaphore guard, that took a generic function object but I can't find one. Does such a thing exist ? void func1(int); vo... 9 Aug 2006 13:44
UTF8 and std::string
A few weeks ago I looked for an implementation of std::string that can handle UTF8 strings. I was thinking that the STL iterator abstraction would be nice for iterating over a variable length encoded string. So far I haven't found anything. Does anybody know of a UTF8 std::string implementation? I'm really cu... 20 Jun 2006 10:04
localtime deprecated?
Hi all, while compiling an existing project in the new MSVC 2005 compiler, I received the warning that: : warning C4996: 'localtime' was declared deprecated C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(114) : see declaration of 'localtime' Message: 'This function or variabl... 9 Jun 2006 19:59
VC++ compiler bug?
The code: template <template <class> class Search > class Test : public Search< Test<Search> > { public: typedef Test<Search> Parent_t; }; template <class Host> class Y { public: void Search(); }; class CallManager : public Test<Y> { }; This code successfully compiled by gcc and comeau. But if I ... 4 Jun 2006 09:34
Partial specialization of member class
The following code doesn't compile with g++ 4.0.2: -- #include <iostream> template < typename T > class A {}; template < typename T > class B { public: struct C; }; template < typename T > struct B<T>::C { void foo() { std::cout << "C" << std::endl; } }; template < typename T > struct B... 7 Mar 2006 20:16
no appropriate default constructor available
When writing the following code: class Base { Base(const Base &rhs) {} ~Base(); }; void f() { Base b; }; The compiler shouts: no appropriate default constructor available But when changing it to: void f() { Base b(); }; it compiles. Why? [ See f... 18 Feb 2006 07:25
First  |  Prev |  Next  |  Last
Pages: 50 51 52 53 54 55 56 57 58 59 60 61