I am getting the correct chars when i read each individually such as data.at(0), (1)...etc. But when I am trying to read them into variables, i am getting some weird values for some of these. For instance:
Getting value of 3, i should be getting the value of 1311780402
Also something i noticed if i read some of the values later, I would use the (int) parameter to convert the char to the ASCII standard, and some of the values were negative. (For instance, should get 127, would get -128, absolute value of both adds up to 255). I believe someone said at one point that if i am trying to implement a byte from C# in C++, i should use an unsigned char vector instead of a char vector.
var version = reader.ReadUInt32();
unsigned long int version; reader.read(reinterpret_cast<char*>(&version),sizeof(version));
Edited 5 Years Ago by MasterGberry: n/a