On Page 175 Paragraph 1 of Effective C++ Meyers has this to say about generalized functors and binding:
I find what tr1::function lets you do
so amazing, it makes me tingle all
over. If you're not tingling , it may
be because you're staring at the
definition of ... and wondering what's
going on with the ....
And I agree w...
Hi all,
I would like to use the Platinum SDK in order to develop a cross platform uPnP AV Host using Qt. I can't find any documentations or wiki for this library.
Does anyone already used the Platinum SDK and have some documentations for usage? Any example is of course welcome.
Thanks
...
I'm trying to automatically resolve typedefs in arbitrary C++ or C projects.
Because some of the typedefs are defined in system header files (for example uint32), I'm currently trying to achieve this by running the gcc preprocessor on my code files and then scanning the preprocessed files for typedefs. I should then be able to replace t...
I like to know if its possible to use win32 keyboard hook function (SetWindowsHookEx , SetWindowsHookEx ) in a Qt application.
If possible pls provide a sample code on using SetWindowsHookEx , SetWindowsHookEx functions in Qt.
//Update as of 18 Feb 2010 //
I havent figured out how to do that in QT yet.
But as a workaround I have cre...
Hi,
in my next project I want to implement a GUI for already existing code in C++.
My plan is to wrap the C++ part in a DLL and to implement the GUI in C#. My problem is that I don't know how to implement a callback from the unmanaged DLL into the manged C# code. I've already done some development in C# but the interfacing between manage...
I need this us all known "choose file" feature in my program, so i can load files.
What is this thing called as and where is the code for it?
...
I'm using a boost variant to hold some generated types, right now my code generator creates a header with the types and a variant capable of holding them. At initialization time, I'd like to iterate over the allowable types in the variant, not the types the variant is holding at the moment.
Can I do this with a variant?
...
I'm a bit curious about how C and C++ handle data which isn't stored in variables, e.g:
int IE6_Bugs = 12345;
int Win_Bugs = 56789;
Yeah - everything clear. IE6_Bugs has 123456 stored at it's specific memory address.
Then what about..
if ( IE6_Bugs + Win_Bugs > 10000 )
{
// ...
So C grabs the values of the two variables and adds...
And now after some work, I finally understand how the KDop bounding volume are created and how the collisions are intersected and I maked a working implementation of them.
Now the problem is another. :D
How can I intersect (it has to be possible, or it would not make any sense) 2 K-Dop of different K values? (obviously we know beforehan...
Hi everybody,
I have this double for-loop, where I have both row-order and column-order array indexing, which should be bad for performance.
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {
/* Column-major order */
d = array_a[col*height +row];
if (d < 0) { d = 0; }
/* Ro...
On page 6 of Scott Meyers's Effective C++, the term 'copy constructor' is defined. I've been using Schiltdt's book as my reference and I can find no mention of copy constructors. I get the idea but is this a standard part of c++? Will such constructors get called when a pass a class by value?
...
On page 42 of Effective C++, a pointer is used as an array name ala
AirPlane *newBlock = ...
newBlock[i].next=0;
I've not been aware that this is legal. Is this part of the c++ standard? Is it common practice?
...
I found some code recently where extern "C" was added in source file also for functions. They were also added in the header files where they were declared.
I was under the assumption that adding 'extern "C" in header files was sufficient.
Where should extern "C" blocks be added?
UPDATE:
Suppose I am compiling my C code using a CPP co...
What im doing wrong this time? The following code always returns 4 bytes only, instead of the whole string:
HKEY hkey;
DWORD dwType, dwSize;
char keybuffer[512];
if(RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("software\\company name\\game name"), 0, KEY_READ, &hkey) == ERROR_SUCCESS){
dwType = REG_SZ;
dwSize = sizeof(keybuffer);
...
How can << be used to construct a string ala
int iCount;
char szB[128];
sprintf (szB,"%03i", iCount);
...
I recently tried to understand a C++ program that was written by somebody who I assume had a background in functional programming: For example, he had declared a closure class which he extensively used and which does somewhat resemble what is known as a closure in functional programming. Another class was called a guard, but I haven't qu...
Hello. Here is a sample code:
class Base {
public:
virtual void common();
};
class Derived {
public:
void common();
virtual void spec(); // added function specific for this class
};
class BaseTracker {
public:
void add(Base* p);
private:
vector
};
class DerivedTracker {
public:
void add(Derived* p);
private:...
What is the closest thing like Hadoop, but in C++?
In particular, I want to do distributed computing using MapReduce.
Thanks!
...
I've been working with XAudio2 lately. After going over the samples, example code, and more-sparse-than-I'd-like documentation available from Microsoft and the MSDN, I've found that there aren't any easy-to-Google resources on creating and using XAPO effects, nor any XAPO effects produced by third parties that I can download and/or buy....
How to write unicode character farsi in c++ in ms-dos?
cout<<"Helo world"<<"سلام جهان";
...