If you have an array, "char foo[50]", "foo" is a char* to it's first element. This is a constant and not a variable. What you have is the same. While buffer is a 2d array, buffer[x] is one of it's rows. You can't assign a pointer to (constant) pointer and expect it to copy all elements. You have to use memcpy, std::copy or a for loop.