General C++ Programming - August 2011 (Page 22)

Can we control the order in which two threads are executed
 
Say I have two threads P and C. I want the execution to follow the P C P C P C pattern. In order wor...
[9 replies] Last: Thank you all so much. Your input was very helpful. My program has def... (by vasiqshair)
by mof
Using BOOL as threadlock (1,2)
 
Hello, I've written my first multithreaded app (a directshow filter) but I have a question about ...
[20 replies] Last: Well my thread aware filter is working. It involves 3 threads and two ... (by mof)
Please explain this small code
 
#include<iostream> using namespace std; class area { double dim1, dim2; public: void seta...
[4 replies] Last: As Syuf said, derived classes can use (some of) the methods declared i... (by andywestken)
Parse Split Delimited str.
 
EDIT:: Here is a literal example of what I need. There will be a CSV file that is formatted like th...
[7 replies] Last: Yeah, kind of. I wanted to be able to repeat the variables as well. I ... (by JeremyMH)
Using Peterson's solution for mutual exclusion
 
The idea was to have the producer thread run BEFORE the consumer thread. Always. But my program runs...
[1 reply] : use condition variable together with mutex http://www.cs.loyola.edu/~j... (by agile)
string and sprintf()
 
Hello, I've a got a question. How can I use std::string object as the first argument of sprintf(), ...
[8 replies] Last: The snprintf () function is C99, and it has some issues. http://linux... (by Duthomhas)
by liwei
test
 
#define CFA_INFRA_LOG_SOURCE 1 #include <CFAInfra/logging/Logging.hpp> #include <iostream> #pra...
[1 reply] : What's the question? Also use code tags. See http://www.cplusplus.co... (by webJose)
File's icon
 
#include <windows.h> #define IDI_ICON1 101 char title ="New Window"; LRESULT CALLBACK P(HWND A...
[10 replies] Last: You edited winuser.h to add hIconSm to WNDCLASS? You should never c... (by andywestken)
DirectX9 Assistance Required
 
I'm working on a wrapper for DirectX9, and it's coming along nicely. My current objective is to cons...
[2 replies] Last: That clears things up :) Thanks, Quirk. Wazzak (by closed account zb0S216C)
STL
 
who body can find what is wrong in this code : template<class f, class h, class g> struct myfun : ...
[11 replies] Last: oh oh oh very very very bad mistake X_X tnx and tnx all my friend (by ahura24)
const and casting
 
Okay, for an intellectual exercise, I was digging in to the C++ spec. I was attempting to see how mo...
[1 reply] : The compiler must have exchanged your references of constant i with it... (by webJose)
intellisense not working for some pointers
 
Hi guys. I have a problem with intellisense. I have written a class with pointers to the members, bu...
[7 replies] Last: Thanks a lot for your guide. I didn't know about inline files. Can I a... (by soheilghafurian)
code optimization question
 
Using my game as an example again... Is passing a variable such as HDC everytime a common functio...
[2 replies] Last: oh ok. thank you. Ill just leave it as is then. (by closed account zwA4jE8b)
by kkg
Help with library implementation
 
Hi all, I'm attempting to write a program that will compute the FFTs of a data set 32 point accr...
[no replies]
by Chathu
Arrays of char
 
Hi, This Is A Question About Arrays. Plz I need Help.This Is A Simple Code I Wrote. #include<ios...
[2 replies] Last: Thanks a Lot For Your Help!!! (by Chathu)
Undefined reference???
 
I don't understand this error on gcc, mingw. // this stuff is in a separate file. namespace p...
[4 replies] Last: Static class members have to be both declared and defined. The problem... (by helios)
Default value in functions
 
If I create a function with default value inputs like this prototype: void F(int a = 0, int b = 1, ...
[1 reply] : Unfortunately, you can't do this -> F(2, ,3); A simple solution wou... (by m4ster r0shi)
const struct member in aggregate definition
 
The other day I updated the contents of a cpp file containing assorted static data definitions to ti...
[1 reply] : C++ Standard section 8.5.1 wrote: An aggregate is an array or ... (by hamsterman)
Division by 100 Precision
 
I have this code below: ---> long decimal = 57; long decimal_divider_ = 100; double dval = (...
[1 reply] : Floating point math is not exact. (by Zhuge)
Deleting Static Library Asset
 
So here's the deal: I've got a static character reference array which is an asset of a library I'm b...
[2 replies] Last: So there's no reason to deallocate it? That makes sense. Thanks! (by Gatleos)
August 2011 Pages: 1... 2021222324... 29
  Archived months: [jul2011] [sep2011]

This is an archived page. To post a new message, go to the current page.