I've discovered that std::string's are very slow compared to old-fashioned null-terminated strings, so much slow that they significantly slow down my overall program by a factor of 2.
I expected STL to be slower, I didn't realise it was going to be this much slower.
I'm using Visual Studio 2008, release mode. It shows assignment of a...
I need to make a large c++ library avaiable for use in .Net languages such as C#.
The library contains a large number of classes which can be broken into two groups. Refrence counted classes, which implement the IRefCounted abstract class and use a factory method to create them, and just plain classes using new/delete.
In adittion ther...
Friends
On HP-UX box when Iam passing a string object to function
Im getting the following below error
Error 422: "../header/Handler.h", line 24 # 'string' is used as a type, but has not been
defined as a type. Perhaps you meant 'String' as in class String
["/opt/aCC/include/SC/String.h", line 66].
int populateBindingHan...
Hi to all!
i've a problem with openCV library under MacOs 10.4. When I try to execute this row to save some frame captured from webcam
CvVideoWriter *writer = cvCreateVideoWriter(
"out.avi",
CV_FOURCC('M','J','P','G'),
fps,
...
I have installed Eclipse and CDT (to use C/C++ in eclipse CDT is needed), as well as installing Cygwin so that I can compile my files.
In environment variables I've set Path to include the following: "C:\cygwin\bin;"
g++, make and GDC are all installed via Cygwin. I made sure of this by searching for them in the bin folder - they're al...
Recently, I've got a dangerous idea into my head after reading this blog post. That idea can be expressed like this:
I don't need most of what the C++ standard library offers. So, why don't I implement a less general, but easier to use version?
As an example, using the STL spits out reams of incomprehensible and mangled compiler errors...
Hi there,
We are trying to offer a license mechanism for every feature our Linux application is running and we are thinking of controlling it in a centralized way using a license server:
Our aim for licensing is:
Deny features the operator has not bought.
Offer trials (features which expire if they are not bought).
Activate features ...
I have a Visual Studio 2008 project that produces a file called: "Game-Release.exe".
This was configured under Project Properties -> C/C++ -> Linker -> General:
$(OutDir)\$(ProjectName)-Release.exe
I would like to take this a bit further by have an incrementing build number so I would have something which says:
Game-Release-Build-10...
Have you used any profiling tool like Intel Vtune analyzer?
What are your recommendations for a C++ multi threaded application on Linux and windows? I am primarily interested in cache misses, memory usage, memory leaks and CPU usage.
I use valgrind (only on UNIX), but mainly for finding memory errors and leaks.
...
Hey guys,
I'm from a Java school, but I'd like to get my hands dirty in C/C++ development as well. Can you suggest:
1) a Lightweight beginner IDE [Eg: JCreator for Java] (Simple and small download)
2) a full-blown advanced IDE [Eg: Eclipse for Java] (Every feature and huge download)
3) should I use GCC or other compilers?
Thanks a lo...
QT documentation states that signals and slots can be 'direct', 'queued' and 'auto'.
It also stated that if object that owns slot 'lives' in a thread different from object that owns signal, emitting such signal will be like posting message - signal emit will return instantly and slot method will be called in target thread's event loop....
My team need the "Sobol quasi-random number generator" - a common RNG which is famous for good quality results and speed of operation. I found what looks like a simple C implementation on the web. At home I was able to compile it almost instantaneously using my Linux GCC compiler.
The following day I tried it at work: If I compile in V...
As the question says, I want to load a DLL from a location in memory instead of a file, similarly to LoadLibrary(Ex). I'm no expert in WinAPI, so googled a little and found this article together with MemoryModule library that pretty much meets my needs.
On the other hand the info there is quite old and the library hasn't been updated fo...
How can I statically link the intel's TBB libraries to my application?
I know all the caveats such as unfair load distribution of the scheduler, but I don't need the scheduler, just the containers, so it's ok.
Anyways I know this can be done, although its undocumented, however I just can't seem to find the way to do it right now (altho...
i'm using ECLiPSe programming logic system.
i want to implement the yield method for passing the values from prolog to C/C++.
Has anyone implemented it?
Are there any other ways for passing the values?
...
I have a simple hierarchy of widgets: GraphWidget -> MotionWidget -> NodeWidget. I am new to Qt, so I am not quite sure about how some insides work yet. Basically, GraphWidget creates a single MotionWidget M and sets M's parent to itself. M then goes away and creates a bunch of NodeWidgets. However, NodeWidgets never get painted nor does...
How do i pass a pointer to a member function to std::list.sort()?
Is this possible? Thanks
struct Node {
uint32_t ID;
char * Value;
};
class myClass {
private:
uint32_t myValueLength;
public:
list<queueNode *> MyQueue;
bool compare(Node * first, Node * second);
...
I have a problem with the linker when I build my current project.
The error it comes up with is as follows:
libmiinddynamic.so: undefined reference to `std::basic\_ostream<char, std::char\_traits<char> >< <double, double, SparseImplementationLib::DefaultPtr<double, double> >(std::basic\_ostream<char, std::char_traits<char> >double, dou...
I feel like this one has been asked before, but I'm unable to find it on SO, nor can I find anything useful on Google. Maybe "covariant" isn't the word I'm looking for, but this concept is very similar to covariant return types on functions, so I think it's probably correct. Here's what I want to do and it gives me a compiler error:
c...
I need to compare one given value with a retrieved values. I do this several times in the code. I am not satisfied with how it looks and I am seeking for a some sort of an util function. Anyone wrote one?
Number of values I am comparing with is known at the compile time.
Update: I'd like to get rid of containers as I know exact amount...