Is there any way I can cross-compile C/C++ code for Windows (XP, Vista, Win7), ideally in 64-bit as well as 32-bit (for Vista and Win7), from a Solaris or OpenSolaris setup? My codebase is already cross-platform, I would like to cross-compile it (generate windows DLLs and EXEs) from Solaris or Linux as part of an automated process.
I w...
I'm trying to port some code from VC9 to G++, however Ive run into a problem with template specialisations apparently not being allowed for class members.
The following code is an example of these errors for the getValue specialisations of the class methods. In all cases the error is "error: explicit specialization in non-namespace scop...
In Microsoft visual c++ compiler, you can specify linker options using
#pragma comment(lib, "MSVCRT") //links with the MVCRT library
see this page
I find this feature very useful because linker errors are common and i want to just place all the linker options in my source code instead of specifying them to the compiler.
question: I...
Hi!
I want to make a nice simple gui using c++. which have drag and drop capabilities, must be light weight. Im thinking of a gui like utorrent client gui.Its light weight and simple.
please give me information about most easy to use libraries / ide /plugin (on windows platform may be good).
...
I have created a class that allows the user to input their mailing address, order date, type of cookie ordered and the quantity. There were other errors, but I stayed late and with the assistance of my prof, I have fixed them. Now all that is left is that I need to be able to change code to overload the I/O stream operators so that the o...
In one of my programs for school, I use the following function to count the frequency of identifiers in a string, separated by newlines and #:
Input:
dog
cat
mouse
#
rabbit
snake
#
Function:
//assume I have the proper includes, and am using namespace std
vector< pair<string,int> > getFreqcounts(string input) {
vector<string> ite...
Hi All,
I'm learning c++ coming from a java background (knowing a little C from many years ago)...
in Java, it's common practice to use "this" inside a constructor to distinguish the variable passed in as arguments to the constructor from the one declared in the class:
class Blabla {
private int a;
private int b;
Blabla(i...
I have some C# interfaces exposed to COM:
interface IMyInterface
{
IMyListObject[] MyList
{
get;
}
}
interface IMyListObject
{
//properties that don't matter
}
So far I'm testing how our assembly is exposed to COM from C++ and most is working just fine.
My current problem is at one point I have 2 instances of IMyInterfac...
My main interest is with moving code from header files to source files (for decoupling), but keeping the same performance for the inlined stuff.
I'm not sure where to get started, could someone explain what to do?
...
I building a game with QT. Every objects on my GraphicsScene inherits from GraphicsPixmapItem (Player, Obstacles, bombs...). I would like to implment collision effects. For example when the player gets hover a bonus he can pick it.
With the QT framework I can get the collidings items but I don't know which type they are as there isn't i...
Hi all,
I have implemented a POSIX message queue.
On the listener side, I am opening the queue like this:
mqdes = mq_open(s_mailbox_name.c_str(), O_RDONLY | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, NULL);
On the sender side, I am opening the queue like this:
mqdes = mq_open(m_s_mailbox_name.c_str(), O_WRONLY);
The string is the same o...
The software that I write (and sell) is compressed and encrypted before I distribute it. Everytime I release a new build, I keep all the .map files and the generated binaries including the exe before it is compressed and encrypted.
When it crashes on a client's machine I get a minidump back. I open these minidumps in Visual Studio and...
Is there a simple, efficient weak/guarded pointer? I need multiple pointers to the same object that are all automatically set to NULL when the object is deleted. There is one "master" pointer that is always used to delete the object, but there can be several other pointers that reference the same object.
Here are some solutions that don...
I'm building a game in c++ using Qt. I got the collision detection right using GraphicsItem methods the thing is that I don't know how to deal with every different collision type as there is different objects with different behaviour.
...
What does the following mean in C++?
typedef PComplex RComplex [100];
Note, PComplex is a user-defined type in my code.
Thanks
...
Our industry is in high-performance distributed parallel computing. We have an unmanaged C++ application being developed using Visual Studio 2008.
Our application (more like a framework) is supposed to be able to dynamically load code (algorithms) developed by 3rd parties (there can be many dlls) that conforms to our interface specific...
EDIT:
This is a followup to SSE2 Compiler Error
This is the real bug I experienced before and have reproduced below by changing the _mm_malloc statement as Michael Burr suggested:
Unhandled exception at 0x00415116 in SO.exe: 0xC0000005: Access violation reading
location 0xffffffff.
At line label: movdqa xmm0, xmmword ptr [t1+...
Hello. I've read existing questions about this topic on here already, but none of them seem to address my question so far.
Here is the situation:
We are developing a closed-source/proprietary software for a few customers.
Our software is written in C++ and uses Qt 4.6, thus it makes use of the LGPL licensed version of Qt.
The software...
I'm reading this article on the Boost Unit Testing Framework.
However I'm having a bit of trouble with the first example, my guess is that they left something out (something that would be obvious to hardcore C++ coders) as IBM often does in their articles. Another possibility is that my Visual Studio 2005 C++ compiler is just too old f...
Suppose I am given:
A range of integers iRange (i.e. from 1 up to iRange) and
A desired number of combinations
I want to find the number of all possible combinations and print out all these combinations.
For example:
Given: iRange = 5 and n = 3
Then the number of combinations is iRange! / ((iRange!-n!)*n!) = 5! / (5-3)! * 3! = 10 ...