Im doing some binary datafile processing, and im reading the whole file in as a vector of unsigned bytes. If i were to populate a 4 byte object like an unsigned int one byte at a time how would i go about it?
Let me illustrate what im trying to do:
Does this make sense? Am i missing some critical thing that will make my life easier?Code:std::vector<unsigned char> FileContents; //Assume i populate FileContents here, and its correctly filled. unsigned int test; //4 bytes, i want to set the first byte to FileContents and the second to  etc //obviously this is incorrect, im just fishing for the correct way to do it. void * TheVoid; TheVoid = &test; TheVoid = *FileContents; TheVoid = *FileContents; ...
Thanks for your time.