I have a nested std::array of std::tuple. For example,
std::array
std::tuple
std::array<std::array<std::pair<int*, float*>, 12>, 3> my_array;
How can I clear all elements so all the pointers are zeroed (i.e. nullptr)?
nullptr
How can I clear all elements so all the pointers are zeroed (i.e. nullptrs)?
Since you're using std::array, you could just just assign an empty std::array to my_array as shown below:
my_array
my_array = {};
Since you're using
std::array, you could just just assign an emptystd::arraytomy_arrayas shown below: