which sorting algorithm is used for std::list's sort member function ?
Possible Duplicate: Which sorting algorithm is used by STLs list::sort()? Which sorting algorithm can be used for sorting std::list ? ...
Possible Duplicate: Which sorting algorithm is used by STLs list::sort()? Which sorting algorithm can be used for sorting std::list ? ...
Say I have a liner gradient as shown: QLinearGradient linearGrad(QPointF(0, 0), QPointF(0, 100)); linearGrad.setColorAt(1, Qt::red); linearGrad.setColorAt(0.5, Qt::yellow); linearGrad.setColorAt(0, Qt::green); How to get the color of the point QPointF(0, 28.5) in this gradient? Indeed I want to have this kind of color distribution to...
I've been working in C++ in embedded environments for a number of years, developing navigation applications. There is a gaming company in my hometown that I like the look of, but I don't have game development experience. You could consider a navigation app as a type of game, depending on who you are running from. My question is, what ...
I'm looking for a scripting language that works on 32-bit and 64-bit machines as well as on Windows and Linux. I will be embedding it into a C++ application so I prefer it to be natively written in C++ rather than C. I also would prefer the script to have thread/asynchronous support. So far the languages that I have looked at are GameM...
Hi guys, I was doing some simple openframeworks (C++ based) tests drawing different shapes and I was wondering how to apply filters like blur, glow... I come from an AS3 background where this is a piece of cake. I know it won't be that easy but I'd like to find some kind of lead. I've read some people is using ofxShader but I can't fi...
Hello again gurus, I have compiled some external C++ code into a dll, thirdpartycode.dll, using Visual Studio 2008. The code is wrapped in extern "C". Since I am cross compiling, creating a 64 bit dll on my 32 bit machine; I am using x64 as "Active solution platform" in the "Configuration Manager". My thirdpartycode.dll compiles and li...
Hello. I have a unmanaged C++ function with the following signature: int function(char* param, int ret) I am trying to call it from C#: unsafe delegate int MyFunc(char* param, int ret); ... int Module = LoadLibrary("fullpathToUnamanagedDll"); IntPtr pProc = GetProcAddress(Module, "functionName"); MyFunc func = (MyFunc)System.Runt...
I have a problem regarding 'static const' member initialization. In a templated class I define a const member and initialize it outside the class. When I include the .h file where this class is implemented in multiple .cpp files, I get an LNK2005 error (I'm using VS2010) that says the constant is already defined. // List.hpp template <...
Can anyone tell me what the file "/usr/include/c++/4.4/exception" would have to do with this error. There is no main defined in that file. I am not sure how to read the error message. ./libfoo.a(main.o): In function `main': /usr/include/c++/4.4/exception:62: multiple definition of `main' interface-wx/App.o:/usr/include/c++/4.4/excepti...
Why would I want to define a C++ interface that contains private methods? Even in the case where the methods in the public scope will technically suppose to act like template methods that use the private methods upon the interface implementation, even so, we're telling the technical specs. right from the interface. Isn't this a deviati...
Here is the deal: I have a multiple process system (pre-fork model, similar to apache). all processes are writing to the same log file (in fact a binary log file recording requests and responses, but no matter). I protect against concurrent access to the log via a shared memory lock, and when the file reach a certain size the process th...
can you add different class objects to same list? ...
Hello to everyone! I have some problem with organizing classes properly. Suppose, I have some class ABase. When I want to create some different (more particular) abstraction of this class (denote it AParticular), I can use inheritance or just composition. Then it is easy to treat AParticular as ABase: in case of inheritance it is made a...
Hello all, I am working on a AI dynamic link library. It is to be explicitly linked and all of this is handled by a simple header include. I am at the moment trying to create the code for the DLL to be able to call functions in the main EXE to manipulate the world and also to be able to query functions to learn about the state of the ...
Hi all do you know if it is any difference in performance when I access a std::map element using find or operator []? One returns an iterator and the other a const ref to the object. Which one might be quicker becuase of all of the behind the scene of the STL? Regards AFG ...
Hi, In C++ what does the error mean "class does not name a type"? ...
Hello, I want to install boost library on ma PC with Vista and Visual Studio 2010. First of all a downloaded boost 1.42 from official site and unpacked to c:\boost_1_42_0 Then I invoked bootstrap.bat but i get some errors: c:\boost_1_42_0>bootstrap.bat Building Boost.Jam build engine Failed to build Boost.Jam build engine. Please con...
I found some documentation about interop with OpenOffice using technologies like COM, but before delving in more deeply I wondered if anyone's worked on this kind of thing? We have a need for the following, all wrapped up in a method call from a client PC (client talks to server using COM): Client sends a map of name/value pairs to a ...
i am trying to implement binary search tree #include <iostream> using namespace std; class BST{ private : int v,*n,vn; struct node{ int val; node *left,*right; node(int i){ val=i; left=right=0;} }; node *root; node *rinser...
Hi, I have a class call grid. The class holds two 2d char arrays for storing a grid... The class has two functions for creating the memory for the grid and releasing the memory for the grid. Grid.h private: char **gridOne; char **gridTwo; Grid.cpp void Grid::allocateGridMem() { _gridOne = new char*[gridRowCount()]; _gridTwo =...