No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
12 Posted Topics
Hi, I want to expose an API for DLLs. The DLLs will be loaded from the application and there should be API functions DLLs can make use of. These API functions will affect the application. Is there any standard way of doing this? Can anyone give me some keywords to … | |
I declared this inside one function: [CODE] void function() { .... static const int iLimit = GetLimit(); int iL = a_MyArray[iLimit]; .... } [/CODE] The code compiles ok in g++. What I want to know is whether the GetLimit function will be called only once (At the first call to … | |
I am using multiple threads that are doing work. I need the threads to update an integer once they finish processing. [CODE] //Lock i_Flag++; //Unlock [/CODE] Then [CODE] if(i_Flag == i_ThreadCount) //Do something. [/CODE] My question is whether I need to use locks around i_Flag++ because it is a simple … | |
Hi, I am playing with metaprogramming. I have this problem: [CODE] template<bool f> class A { public: void P() { cout << "f = true" << endl; } void Q() { cout << "Q" << endl; } }; template<> class A<false> { public: void P() { cout << "f = … | |
I have been working with pthread_cond_t and associated functions and I read that usually a mutex is used in conjunction with the condition when calling pthread_cond_wait or pthread_cond_signal/broadcast. The online texts only mention that the mutex is used for 'predictable behaviour'. Does this mean that there's no need to use … | |
Re: Usually if you are loading the dll at runtime you can use a factory function and a base class to get derived class instances from the dll. But you can't export classes themselves. | |
Hi, I was assigned to study and understand some code and I was told the major problem with the program was poor performance. Here's the bottleneck: A global data set is maintained. This data set is updated regularly. Then there are threads that have to do some processing using a … | |
Hi, Can someone tell me how to suppress all the warnings g++ produces? Not specific warnings : I know how to do that. I want to not see any warnings at all when I build. Thanks. | |
Hi, I am so frustrated by this error and I don't know how to solve it. Hope someone helps! I have a dynamic lib (Call it D) which is loaded at runtime with the dlopen() function inside a static lib (Call it S). There is a header file that contains … | |
Hi, Consider the code below: These interfaces are defined in a header. [ICODE] class IA { public: virtual void A() = 0; }; class IB { public: virtual void B() = 0; }; [/ICODE] This concrete class is defined in a library which is later dynamically loaded. [ICODE] class Implementation … | |
Hi, I wrote the following macro: [CODE] #define COM " #define GET_VAR_LINE(var, type) COM var = %type COM, var [/CODE] So, this code : [CODE] int main() { int x = 0; printf(GET_VAR_LINE(x, d)); }[/CODE] expands to [CODE] int main() { int x = 0; printf(" x = %d ", … | |
Hi, I have a program, which has some worker threads that are performing tasks. The main thread assigns work to the worker threads. The worker threads wait for a message from the main thread (with data) and start to work. After completion of work, working threads again wait for more … |
The End.