Based on this question I am going to use Poco::NamedEvent, but I need to wait for multiple events (like win32 WaitForMultipleObjects()
Is there such a thing in poco? (searching the docs doesn't yield much but perhaps I am not using the right searches)
...
I'm trying to make a macro to make it easier to define properties.
Simplified example but at the moment I have this to provide a property with a public get and private set:
#define propertyRO(xxType, xxName)\
property xxType xxName\
{\
xxType get() {return m___##xxName;}\
void set(xxType value) {m___##xxName = v...
;) Yeah. I also have C++ in my solution.
How do I add a custom dictionary there? There is no tool for an includes file, as well as no way to tell it the type is CustomDictionary.
THe advice and approach shown in http://msdn.microsoft.com/en-us/library/bb514188(v=VS.100).aspx is not usable for C++ projects.
...
I'm writing an application that is able to run as a service or standalone but I want to detect if the application was executed as a service or in a normal user session.
...
Hello all
I'm currently learning the QT framework. I need to know if it's possible to set the debugger to give meaningful messages as opposed to what it gives me right now, which is the failed step in the build process (usually the '.o' file) I need to know if it's possible to set it to giving meaningful message like Visual studio
...
I have some problems using two dimensional array in the code and need some help.
static const int PATTERNS[20][4];
static void init_PATTERN()
{
// problem #1
int (&patterns)[20][4] = const_cast<int[20][4]>(PATTERNS);
...
}
extern void UsePattern(int a, const int** patterns, int patterns_size);
// problem #2
UsePattern(10, ...
The challenge is to find the fastest way to determine in C/C++ the length of a c-string using bitwise operations in C.
char thestring[16];
The c-string has a max size of 16 chars and is inside a buffer
If the string is equal to 16 chars doesn't have the null byte at the end.
I am sure can be done but didn't got it right yet.
I am wo...
Hello
I'm writing a program that uses QUdpSocket for transmiting data over the network. This is my first socket program, and I've come across an interesting problem called Endianness.
My actual question in, do I have to worry about Endianness when I'm using QNetwork as my sockets library? If I do have to worry, what do I have to do to ...
I have been trying to take some old Symbian C++ code over to Android today using the NDK.
I have little to no C or C++ knowledge so its been a chore, however has to be done.
My main issue is that I'm having trouble porting what I believe is Symbian specifi code to work using the small C/C++ subset that is available with the Android NDK...
vector<int>& mergesort(vector<int> &a) {
if (a.size() == 1) return a;
int middle = a.size() / 2;
vector<int>::const_iterator first = a.begin();
vector<int>::const_iterator mid = a.begin() + (middle - 1);
vector<int>::const_iterator last = a.end();
vector<int> ll(first, mid);
vector<int> rr(mid, last);
vec...
hi,
following situation:
loading an image into a pictureBox works
selecting ( / marking) an area by drawing a rectangle via ControlPaint::FillReversibleRectangle(...) works
how do i save the selected part of the image?
thanks alot
...
I've some C++ projects, which does not use exception handling.
What are the benefits of adding -fno-exceptions , or does gcc figure out itself that I don't use exceptions(nor any libraries that uses exceptions) ?
...
I am totally novice in C++ Builder.
Never tried working with VCL frames.
So, i have some Tform with Tpanel and two frames designed.
How can i display designed frames on my forms panel?
Tired searching similar examples.
...
I have the following code:
template <class T>
struct pointer
{
operator pointer<const T>() const;
};
void f(pointer<const float>);
template <typename U>
void tf(pointer<const U>);
void g()
{
pointer<float> ptr;
f(ptr);
tf(ptr);
}
When I compile the code with gcc 4.3.3 I get a message (aaa.cc:17: error: no matching function...
Hi,
Is there a way to call an R-Script within C-Code?
I did find the R Api for C (chaper 6. of the 'Writing R Extensions' manual), but as far as I understood this does "only" allow to call the C-Implementation of R. Of cause I could call the R-Script via shell, but that's no solution for me, since this does not allow proper passing of...
Hi everyone:
I have a question, here are two classes below:
class Base{
public:
virtual void toString(); // generic implementation
}
class Derive : public Base{
public:
( virtual ) void toString(); // specific implementation
}
The question is:
If I wanna subclass of class Derive perf...
Hi All,
I was looking at Qt and came to wondering, what is the most popular general purpose C++ framework, and what are some pro's and con's?
Thanks,
Kyle
...
In the following code, when the ctor of X is called will the ctor of A or B be called first? Does the order in which they are placed in the body of the class control this? If somebody can provide a snippet of text from the C++ standard that talks about this issue, that would be perfect.
class A;
class B;
class X
{
private:
A a;
B b;
}...
I have these two methods on a class that differ only in one method call. Obviously, this is very un-DRY, especially as both use the same formula.
int PlayerCharacter::getAttack() {
int attack;
attack = 1 + this->level;
for(int i = 0; i < this->current_equipment; i++) {
attack += this->equipment[i].getAttack();
}
...