N
N
Neonoviiwolf2018-07-23 00:24:51
C++ / C#
Neonoviiwolf, 2018-07-23 00:24:51

Removing a 2D std::vector?

Kind
Here it is necessary to delete in the destructor the vector of the type Infa in Google is complete and different, how is this done correctly? vector<vector<bool>> vec_bool

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
15432, 2018-07-23
@15432

Yes, he will leave. If you have a pointer to a vector in your class, and it was allocated dynamically through new, then you just need to delete, and that's it.
For each element of the vector, the destructor is called when it is removed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question