I want my S60 Application to utilize the Stomp protocol.
Although it would be fairly simple to implement myself (but nothing is ever as simple as I hope with Symbian) - I am wondering if anyone has any experience in this already.
It seems a Stomp library exists in almost every other language already. The closest match for Symbian would...
Hi, i have little problem with boost::asio library. My app receive and process data asynchronously, it create threads and run io_service.run() on each of them.
boost::asio::io_service io;
boost::thread_group thread_pool;
...
int cpu_cnt = get_cpu_count();
for (int i = 0; i < cpu_cnt; ++i)
{
thread_pool.create_thread( boost::bind(&ru...
So I'm trying to get rid of my std::vector's by using boost::ptr_vector. Now I'm trying to remove an element from one, and have the removed element deleted as well. The most obvious thing to me was to do:
class A
{ int m; };
boost::ptr_vector<A> vec;
A* a = new A;
vec.push_back(a);
vec.erase(a);
But this won't even compile (see below...
Say you have a class who's job it is to connect to a remote server. I want to abstract this class to provide two versions, one that connects through UDP and the other through TCP. I want to build the leanest runtime code possible and instead of using polymorphism I am considering templates. Here is what I'm envisioning but I'm not sure i...
I got this doubt while writing some code. Is 'bool' a basic datatype defined in the C++ standard or is it some sort of extension provided by the compiler ? I got this doubt because Win32 has 'BOOL' which is nothing but a typedef of long. Also what happens if I do something like this:
int i = true;
Is it "always" guaranteed that variab...
I keep hearing a lot about functors in C++, can someone give me an overview as to what they are and in what cases they would be useful?
...
I am inputting a 200mb file in my application and due to a very strange reason the memory usage of my application is more than 600mb. I have tried vector and deque, as well as std::string and char * with no avail. I need the memory usage of my application to be almost the same as the file I am reading, any suggestions would be extremely ...
How do I call the parent function from a dervied class using C++? For example, assume I
have a class called parent, and a class call child which is derived from parent. within
each there is a print function. In the defintion of the child's print function I would
like to make a call to the parents print function. How would I go abo...
I just joined a new C++ software project and I'm trying to understand the design. The project makes frequent use of unnamed namespaces. For example, something like this may occur in a class definition file:
// newusertype.cc
namespace {
const int SIZE_OF_ARRAY_X;
const int SIZE_OF_ARRAY_Y;
bool getState(userType*,otherUserType*)...
I'm trying to write a 2d array into an output file, it's all working fine except in creating the .getline function to draw the array back out of the file. My issue is putting the string length. My current code for the line is;
inputFile.getline(myArray, [10][10], '\n');
but it doesn't like having the string length in square brackets it...
Someone asserted on SO today that you should never use anonymous namespaces in header files. Normally this is correct, but I seem to remember once someone told me that one of the standard libraries uses anonymous namespaces in header files to perform some sort of initialization.
Am I remembering correctly? Can someone fill in the deta...
I can't find much information on const_cast. The only info I could find (on Stack Overflow) is:
The const_cast<>() is used to add/remove const(ness) (or volatile-ness) of a variable.
This makes me nervous. Could using a const_cast cause unexpected behavior? If so, what?
Alternatively, when is it okay to use const_cast?
...
The size and range of the integer value types in C++ are platform specific. Values found on most 32-bit systems can be found here. How do you determine what the actual size and range are for your specific system?
...
I'm using a 3rd party DLL written in unmanaged C++ that controls some hardware we have.
Unfortunately this DLL crashes now and then and I've been tasked to make it "reload" automagically. I'm not too sure about how to proceed to get best results.
My project uses C++.Net 2.0 (2005). I'm wrapping the 3rd party stuff in a separate DLL. I'...
Hi all,
I am developing a prototype for a game, and certain gameplay rules are to be defined in an ini file so that the game designers can tweak the game parameters without requiring help from me in addition to a re-compile. This is what I'm doing currently:
std::ifstream stream;
stream.open("rules.ini");
if (!stream.is_open())
{
...
How do you use GetDIBits and SetDIBits in win32 c++?
...
I'm looking for turn-key ANTLR grammar for C# that generates a usable Abstract Syntax Tree (AST) and is either back-end language agnostic or targets C#, C, C++ or D.
It doesn't need to support error reporting.
P.S. I'm not willing to do hardly any fix-up as the alternative is not very hard.
...
I have a multi-threaded program whereas each thread, at the start of execution, acquires a single connection from a MySql connection pool class. The thread then uses a number of database table wrapper classes to do its business logic by passing its database connection to the wrapper classes. The operations on these wrapper classes are no...
I am curious to learn Boost. But i wanted to ask how important it is to learn.
What pre-requisite one should need before jumping on Boost.
Why i am curious to know about Boost is that many people are talking about Boost on IRC's channels and here in StackOverflow.
Thanks in advance.
...
I'm creating a xml-file for display in Excel using _di_IXMLDocument. But for some tags I get an unwanted extra (empty) xmlns attribute witch makes the file unreadable for Excel...
This is what i do:
...
_di_IXMLNode worksheet = workbook->AddChild("Worksheet");
worksheet->SetAttribute("ss:Name",Now().DateString());
...
and this is what...