2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
11. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
0. Split your array into four parts (use the pointer to determine where you're doing the split, don't make another copy of the data)
1. Create worker threads to sum each with their portion (pointer to the beginning and size).
2. Wait for all threads to finish, sum their results.
If this was a program that needed to do this over and over again, I'd also create a "thread pool" that is precreated. Creating threads on the fly is actually a pretty slow process, you want to do it sparingly.
You may either want to use the circular buffer for holding the pointers of the actual strings or, more likely, for holding the strings themselves.
In the first case coding is pretty straightforward (you may use Wikipedia's circular buffe[^]r page for inception).
On the other hand, the second case is bit more complex, since you have to explicitely manage blocks of bytes (the strings) in the circular buffer.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
This is a good question because I'm not sure any of those really describes Windows messaging well. Sort of interesting given that it's the primary means of communication in the Windows desktop environment. I guess the rational behind this is that you can't really pass along data across messages, you can pass commands/messages and references.
I used to use messages a lot within an application to communicate but it's a bit different when dealing internal to an application because you can pass data by reference easily. Externally, you can only do that if the data is in a place that is accessible to both applications or meets certain restrictions (as described here[^]).