I have added a C# DLL into a C++ project as mentioned at MS support, however I was not able to access its variables and methods inside the class. It also says that it's a struct and not a class, I don't know if it is important but I thought I should mention it is as well. Whenever I write . or -> or :: after the object, nothing appear. B...
I am writing a small gui app with QT4.5 in QtCreator.
The main screen on the app contains a QTreeView with two columns, the first is text the second is a group of icons. These icons represent the last few states of the item displayed in the row.
I am not sure what the best way to do this is. I have currently implemented this by gener...
I'm using asio synchronous sockets to read data over TCP from a background thread. This is encapsulated in a "server" class.
However, I want the thread to exit when the destructor of this class is called.
The problem is that a call to any of the read functions does block, so the thread cannot be easily terminated. In Win32 there is an A...
I'm trying to create my first hierarchy with the following classes (Account, CheckingAccount, and SavingsAccount) and can't figure out how to link the classes together.
Also, should the balance value be public in the header?
Currently it is not, and it shows "error in this context" every time it's mentioned in this main code.
[stackover...
Is it feasible, or advisable, to attempt to make a Google Maps mashup using C++? I would need to be able to display 150 some locations around a county and when people click on the push pin a picture of the location would need to pop up and perhaps a brief description of the landscape there.
C++ is the only language I know as it is all ...
I would like to write a simple xml file using xmllite in win32 c++. the file will be saved over every time the user saves. How do I do this? I'd rather not include any new libraries for this...
...
In C++ (WIN32), how can I get the (X,y) coordinate of a mouse click on the screen?
...
CDirScan function NextL raises "Main Panic KERN-EXEC 0" if it is not called right away SetScanDataL() (i.e. if it is called later within the same active object after another event)
f1() - called within active object
iDirScan = CDirScan::NewLC(aFs);
iDirScan->SetScanDataL(aPath,
KEntryAttDir|KEntryAttMatchExclusive,
ESortNone...
I'm a little curious about some of the new features of C++0x. In particular range-based for loops and initializer lists. Both features require a user-defined class in order to function correctly.
I came accross this post, and while the top-answer was helpful. I don't know if it's entirely correct (I'm probably just completely misunderst...
const XMLDataNode *pointsNode = node->GetChildren().at(0);
std::wistringstream pointsstrm(*pointsNode->GetInnerText());
pointsstrm >> loadedGame.points;
This is code I've written to pull an int from an XML file and pass it into loadedGame.points (an int). However, this isn't working. It compiles but doens't give the right value. Why...
Not being able to wrap my head around this one is a real source of shame...
I'm working with a French version of Visual Studio (2008), in a French Windows (XP). French accents put in strings sent to the output window get corrupted. Ditto input from the output window. Typical character encoding issue, I enter ANSI, get UTF-8 in return, o...
I'm trying to write a game and implement scripting so that later on in development I won't have to recompile everything when I want to change numbers.
My problem is that I don't know how scripts should interface with the game. The scripting language I'm using is angelscript.
Right now, I have a state: the intro state, which I'm using a...
Hi,
Could someone please help me with synchronizing varied number of threads? The problem is when the number of threads can vary from one to 9 and when for instance two clients are connected to server, the communication should be synchronized in this form : client1, client2, client1, client2 ... until the communication is over.
I tried ...
Is it possible to open files from a given directory in C/C++ using wildcard characters?
In the sense, If I want to open files that end with "to(node_id)" from a given current directory in my program.
Example : I need to open files whose filenames end with "to4".
Desired Output : It must open all the files in the current directory with ...
I've been trying to make my code work on Windows (moved from the Mac) and for some reason I get a runtime error related to my strcpy call.
Please help!!
Cust.h
/*
* Cust.h
* Project 3
*
* Created by Anthony Glyadchenko on 11/17/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
#include <iostream>
#include <s...
I am looking for a way to handle sessions through cookies in C++. Can anybody please help me with some hints for the solution?
...
Hi all,
I have an application which runs on a controlling hardware connected with different sensors. On loading the application, it checks the individual sensors one by one to see whether there is proper communication with the sensor according to predefined protocol or not.
Now, I have implemented the code for checking the individual s...
Simple question I think, after I have registered a few system-wide hotkeys with RegisterHotKey() do I need to eventually call UnregisterHotKey() to clean them up, or can I simply exit my application without worrying about it?
MSDN doesn't seem to say, that or I misunderstand it, anyways: I realize I should just go ahead and call Unregis...
In the default AudioUnit project shell that XCode creates, there is a line at the very bottom of your AUEffect .r file:
#include "AUResources.r"
When compiling under Mac OS X 10.6 Snow Leopard, this line causes the following error:
SysError 0 during open of "AUResources.r"
Note, this error occurs in a completely empty project sh...
I make a wxClientDC but nothing happens until I Show() the frame. However, when I call Show(), the blank wxClientDC is flashed on the screen. In Vista, it looks grey. Then my drawing code runs and the grey is replaced with my drawing. Shouldn't I be able to draw to the ClientDC before calling show() so I don't get a grey flicker? Even if...