First  |  Prev |  Next  |  Last
Pages: 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
A strange problem about vector~
Dear All: I have a class as following class A { public: typedef vector<A> List; typedef List::iterator Iter; }; but when I compile with STLPort 5.1 under msvc 8.0 it give an error D:\STLport\stlport\stl/type_traits.h(250) : error C2139: A: an undefined class is not allowed as an argument to co... 29 Jan 2007 17:28
Tree Hashing / Equivalence
Hi there, Let's say I have a node type such as: class Node { std::vector<Node> Children; std::string Value; int ID; }; Are there any C++ libraries that could process a tree of such nodes and calculate a hash value of some sort? Since I already depend on Boost, I was hop... 5 Feb 2007 12:53
BinaryPredicate Question
I'm trying to figure out is the following technique is valid. Given std::vector<DataItem> cache; which is sorted by the ID_ field of each DataItem. And this Predicate class: class IdLessThan: public std::binary_function<long, DataItem, bool> { public: bool operator() ( long lhs, const DataI... 31 Jan 2007 03:07
Applicability of std 14.7.3.18
The std 14.7.3.18 says An explicit specialization shall be declared in the namespace of which the template is a member, or, for member templates, in the namespace of which the enclosing class or enclosing class template is a member. An explicit specialization of a member function, member... 26 Jan 2007 05:27
Virtual Method Behavior That I Don't Understand
I have the following code: //////////////////////////////////////////////// // Content of file "classes.h" #ifndef CLASSES_H #include <iostream> #include <string> #define OVERRIDE 0 class BaseClass { public: BaseClass (void) : m_override (OVERRIDE) {}; virtual ~BaseClass (void) {}; virtual voi... 26 Jan 2007 18:53
portable Unicode programming.
Hello all, I have the intention of using Unicode in my projects. Even if I am a unicode beginner I know enough Unicode to start basic programming tasks like interpreting UTF-8, UTF-16, decoding surrogates, etc. However, the real world is a litle diferent. We need portable application develo... 1 Feb 2007 04:11
problem Boost libraries
{ Mod note: I'm accepting this article because the issues raised here, essentially the quality of specific parts of the Boost library, seem to be of general interest to the C++ community. -mod/aps } A few months ago, in comp.lang.c++.moderated, Wil Evers pointed out some problems in a few Boost libraries (bel... 6 Mar 2007 15:22
adding timestamps to std::cerr messages?
Hi I have redirected std::cerr to a file and std::cout to a different file. Having two files makes it difficult to determine what happened in what order. Therefor id like to add a automatic timestamp to every cout and cerr message. So given this code: std::cerr << "User error: " << iError << ". Quitting." << ... 29 Jan 2007 10:55
Polymorphic Accumulate
Hi, Is it possible to use polymorphic classes as 'accumulators'? Consider the situation where I want to accumulate over a vector, but the user has the option to decide what 'function' is used. Hence, I have a Base class (itself a binary_function) from which two classes are extended (Add and Subtract).... //... 23 Jan 2007 12:06
C++ module initialization and deinitialization doubts
Hi, I'm writing a wrapper around a C++-library. The library provides datastructures/classes and functions from which I am going to build a concrete class. The user of my class is not supposed to know about the library, and unfortunately, the library requires a call to an initialization function at program start,... 24 Jan 2007 02:59
First  |  Prev |  Next  |  Last
Pages: 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203