i started programeing becouse i want to make games that ROCK not games that are boreing , i started with C# and XNA Game Studio 2 ,it was fun but was not to last becouse i didnt like the Limitations of XNA GS2 and hence have UPGRADED to DirectX & C++ , Hope this wasent too Boreing .
Age23 years old
BirthdayNovember 3, 1991
Milkyway Galaxy \ Earth \ Africa \ South Africa \ KZN \ Durban
2. WriteFile( ... (char*)users , sizeof(int)*users_number ) will start to write from element 0 to the last element of the vector because of the sizeof that tells where to stop or because the & operator? What about if I want only to write a single element to the file (like in the last line of the code) it will be ok (char*)sizes or (char*)&sizes with smaller size to write specified in the WriteFile argument ?
That would treat the value of users as the char pointer.
And it would write as many bytes as you tell it to, Which you set correctly.
I would advise you use C++ cast operators( static_cast, dynamic_cast, reinterpret_cast ) instead of C syle as they are searchable and I find them more readable.
Why does the "WriteFile" function have so many parameters?, Could you not just do the same as std::fstream( pointer, byte count ) ?