-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I inherited a big application that was originally written in C (but in the mean time a lot of C++ was also added to it). Because of historical reasons, the application contains a lot of void-pointers. Before you start to choke, let me explain why this was done.
The application contains many different…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have written this qsort:
void qsort(void *a[],int low,int high, int (*compare)(void*,void*));
When I call this on
char *strarr[5];
It says invalid conversion from char** to void**. Why this is wrong?
This is the code:http://codepad.org/Flfm2zAE
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
My question is simple: What are void pointers for in C++? (Those things you declare with void* myptr;)
What is their use? Can I make them point to a variable of any type?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'd like to have a dynamic messaging system in my C++ project, one where there is a fixed list of existing events, events can be triggered anywhere during runtime, and where you can subscribe callback functions to certain events.
There should be an option for arguments passed around in those events…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
Maybe there's no way to solve this the way I'd like it but I don't know everything so I better ask...
I've implemented a simple Queue with a dynamic array so the user can initialize with whatever number of items it wants. I'm also trying to use a void pointer as to allow any data type, but that's…
>>> More