Ask coding questions

← Back to all posts
Help! 2D array tutorial
h
DarkHollow (0)

I created a class called Rotate that dynamically creates a 2D array using a double pointer. I initialize the 2D array in the constructor and for each element, I added a value but for some reason, it's displaying the memory address. Any tips?

Comments
hotnewtop
Coder100 (18092)

Don't use arrays/pointers, C++ exists. Use std::array!
Or std::vector

DarkHollow (0)

It’s for a project and I am required to use double pointer @Coder100