Hello everyone!
This is just a simple question. I've been reading the source of something which attaches to a memory address of a subroutine using DetourAttach(&(PVOID &)BindKeyT, BindKeyD); where BindKeyT is the address to a subroutine in memory. I'm curious, what exactly does (&(PVOID &) mean in english? I understand that PVOID is a v...
Every object in .NET inherits (directly or indirectly) from the common root base "Object". Is there such a common object root in C++? How do I pass any object to a function?
public void DoSomeStuff(object o) { ... }
EDIT: To clarify, the purpose: In that function I want to invoke a pointer to member function. For that I need the objec...
I need a fast inter-thread communication mechanism for passing work (void*) from TBB tasks to several workers which are running blocking operations.
Currently I'm looking into using pipe()+libevent. Is there a faster and more elegant alternative for use with Intel Threading Building Blocks?
...
Hi. i have a little problem, and I am not sure if it's a compiler bug, or stupidity on my side.
I have this struct :
struct BulletFXData
{
int time_next_fx_counter;
int next_fx_steps;
Particle particles[2];//this is the interesting one
ParticleManager::ParticleId particle_id[2];
};
The member "Particle particles[2]" has a self-ma...
Hi,
does aybody know about an open source sound library in C++ or some other popular language that can be used in open source games for recreating sounds and especifically in car racing games to recreate engine sound?
Thanks
...
Given two sorted arrays: A and B. The size of array A is La and the size of array B is Lb. How to find the intersection of A and B?
If La is much bigger than Lb, then will there be any difference for the intersection finding algorithm?
...
Hi,
For legacy reasons I need to use intrusive pointers, as I need the ability to convert raw pointers to smart pointers.
However I noticed there is no weak intrusive pointer for boost. I did find a talk about it on the boost thread list, however nothing concrete.
Does anyone know of a thread safe implementation of weak intrusive poin...
I was trying to declare a callback function in class and then somewhere i read the function needs to be static but It didn't explain why?
#include <iostream>
using std::cout;
using std::endl;
class Test
{
public:
Test() {}
void my_func(void (*f)())
{
cout << "In My Function" << endl;
f(); //Invoke callback ...
Hi
I'm building C++ app with CMake. But it uses some source files in C. Here is simplified structure:
trunk/CMakeLists.txt:
project(myapp)
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
add_subdirectory (src myapp)
trunk/src/main.cpp:
#include "smth/f.h"
int main() { f(); }
trunk/src/CMakeLists.txt:
add_subdirectory (smth)
lin...
Can anybody provide simple steps of "Skeleton Pruning by Contour Partitioning with Discrete Curve Evolution" Algorithm
or c++ code i have document if some one is familiar simple steps of the algorithm
...
Hello all,
This is a question about generic c++ event driven applications design.
Lets assume that we have two threads, a "Dispatcher" (or "Engine"...) and a "Listener" (or "Client"...).
Let's assume that I write the Dispatcher code, and release it as a library. I also write the Listener interface, of course.
When the Dispatcher execut...
Hi guys i have a bit of a problem with a few classes, and i would be very grateful if someone can help me out. So i have:
Already compiled executable (for
whom i don't have the source)
A class in that program that i want to call
The program doesn't have export for the class, and that's my problem i don't have definition for this clas...
I have the following code which replicates the windows manual and auto reset events.
class event
{
public:
event( bool signalled = false, bool ar = true ) :
_auto( ar ),
_signalled( signalled )
{
pthread_mutex_init( &_mutex, NULL );
pthread_cond_init( &_cond, NULL );
}
~event()
{
...
Is it wise to have include guards around template classes?
Aren't template classes supposed to be reparsed each time you reference them with a different implementation?
N.B In Visual C++ 2008 I get no errors combining the two...
...
I'm using MS VC 2008 and for some projects Intel C++ compiler 11.0. Is it worth using tr1 features in production? Will they stay in new standard?
For example, now I use stdext::hash_map. TR1 defines std::tr1::unordered_map. But in MS implementation unordered_map is just theirs stdext::hash_map, templatized in another way.
...
Hi,
How can I list all cached Kerberos tickets, that are connected to objects in a specific active directory organization unit?
Thanks!
...
I have been using CLogViewRecent and MLogViewChangeObserver to monitor call log on S60 5th edition phones.
MLogViewChangeObserver has three functions:
virtual void HandleLogViewChangeEventAddedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
virtual void HandleLogViewChangeEventChangedL(TLogId aId, TInt aVie...
Hi folks,
Summing up, my problem consists on compiling g95 objects inside a C++ application.
Actually, I'm constructing an interface for an old fortran program.
For this task, I'm using the wxWidgets GUI library, and calling fortran subroutines when necessary.
At the beginning, I was developing the entire project compiling my fortran fi...
Since I'm more comfortable using Eclipse, I thought I'd try converting my project from Visual Studio. Yesterday I tried a very simple little test. No matter what I try, make fails with "multiple target patterns". (This is similar to this unanswered question.)
I have three files:
Application.cpp:
using namespace std;
#include "Window....
I'm trying to modify the fridge magnets example by adding a button that will reload the widget where the draggable labels are drawn, reflecting any changes made to the text file it reads. I defined another class that would contain the button and the DragWidget object, so there would be an instance of this class instead of DragWidget in m...