How to create a matrix of pointers using smart pointers for a class?

后端 未结 0 1192
后悔当初
后悔当初 2020-12-28 22:18

Let\'s say we have the following code in c-style

class Dog {
public:
    void woof() {};
};

int main() {
    Dog* mat[5][5];

    mat[0][0] = new Dog();
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题