I am trying to copy some buffers i read from buffer to variables in a class,
const char buf = reinterpret_cast<const char>(serialData);//buffer
Initializing the constructor
YoloRT *r = new YoloRT(readBUF<int>(buf), //classes
for (int i = 0; i < r->n_masks; i++)
r->mask[i] = readBUF<dnnType>(buf);//error line
The error pop ups at the line mentioned, When I debug it, the error statement reads and points at buf and the value of "i" at which this error occurs changes everytime I debug it. I am confused as to what is happening here as the same code works perfectly fine on linux.It would be amazing if someone can explain why this is happening only in windows(MSVC toolchain) and any workarounds for it?