so that I can process the absolute coordinate to windows desktop
This shouldn't matter because coordinates in Windows are always with zero,zero being in the top, left corner of the screen. Whether a screen is rotated 90 degrees to one side, or 270 to the other, you get the same origin reference point (top,left).
int g_x = 0;
DWORD WINAPI Add(void* p) //p unused parameter
int i = 0;
for( ; i < 10; i++ )
//Wait for all the 10 threads to complete its execution
//Now print the result.You expect 10 but it may not be...
cout<<"g_x = "<
Because the order of the execution.
Suppose you have 4 floats a,b,c,d
and you want to sum up them.
In case of serial implementation, it will be like a + b + c + d
But in case of parallel, it may execute like
(a+b) + (c+d)
So the result wont be same.
This answers your 4th question.
Overheard many years ago that "C is strongly typed language".
So what's up with unspecified / unknown "standard definition " of int abs (int) overloaded by , again unknown source "standard", to <b>float abs ( float)</b>?
Is it just "progress" AKA from plain C to C "whatever is latest derivative of it" or just plain lack of real standards ?
Happy coding in 2015
Sorry I did not specifically say "C++".
I should have said "is C++ ( and derivatives ) strongly typed " to make the question clearer.
Maybe the question is just irrelevant with overloading, thus academic as I said in title.
Exactly, you said "Overheard many years ago that "C is strongly typed language".", and went on to talk about overloading. I responded that it (overloading) was not C it was C++. So I apologise that my answer was not very clear.