I have a std::vector<uint8_t[1115]>
and I want to store a char*
in it.
I don't understand how I have to cast the char* to fit it into the vector.
Maybe its stupid but I tried this:
char* myCharArray = new char[1115];
std::vector<uint8_t[1115]> myVector;
myVector.push_back(reinterpret_cast<uint8_t*>(myCharArray));
I don't understand why this is not working. The error is as follows:
error: no matching function for call to ‘std::vector<unsigned char [1115]>::push_back(uint8_t*)’