Category : dynamic-memory-allocation

I am having issues assigning value to unsigned short* and unsigned char* buffers. The code looks something like this: // Header File unsigned short* short_buff; unsigned char* char_buff; // Implementation File short_buff = new unsigned short[10]; memset(&short_buff, 0, 10); char_buff = new unsigned char[10]; memset(&char_buff, 0, 10); unsigned short sVal = 0; unsigned char cVal ..

Read more

I am creating a mathematical data structure in c++20 (Mingw-w64 clion) which i can partially offload from memory to storage and vice versa, Due to its capacity and size. While learning how i could work with memory i tested a particular code which to my knowledge it should work. But the app crashes due to ..

Read more