Ok, I have asked this b4, and I don't think I have gotten a straight forward answer, I really need this answered, because what I am doing is "legal", but i am 100% it does not make logical sense.
This it the original C# code
var version = reader.ReadUInt32(); if (version != 0x4e302e32) return data;
As you can see, they use version with Hex coding. ReadUInt32() is meant to read 4 bytes and they use var to create an "auto" storage to hold it. I need to read the same 4 bytes in C++ into a variable and be able to implement the same thing.
Up to this point I have been doing
unsigned long int temp = 0; inFileDrs >> temp; // inFileDrs is reading the file just as reader is, opened in binary mode
Now that I look closer, I don't think this is going to work for me. I came up with a possible solution (along the idea of one), but this is illegal because auto's have to me initialized. So my question to the community is, what should I try? Thank you :)
auto tableCount2; inFileDrs.read(tableCount2, 4);