192|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
My buffer is a char array and I want to read 4 bytes into an unsigned int. I thought this code would work fine but the compiler is generating a warning
note that (int*) is what is used in C programming.
although it valid syntax in C++ you explicitly choose what kind of casting you want ie: unsignedint i = static_cast<unsignedint>(buffer[curBufPos]);
C is insecure because you it gives you a chance to introduce bugs.
anyway I don't understand why are you taking an address in your example?
My online game required a stream so I wrote a stream class. Their is a buffer that is allocated some space. I am adding all the security code before release .