I am very new to C++, so probably there are lots of different approaches to the problem that i want to solve, feel free to share your opinions and comments please.
void printCards(int cardCount)
{
std::array<int, 15> cardArray{};
std::array <std::array<int, 3>, 9> preparedCardArray{};
std::cout << '\n';
for (int i = 0;i < cardCount; i++)
{
cardArray = createCard();
cardArray = sortCard(cardArray);
preparedCardArray = prepareCardsForBingo(cardArray);
cardToConsole(preparedCardArray);
std::cout << '\n';
}
}
In the code above i create an std::array which has a type
std::array <std::array<int, 3>, 9>
so when i create that std::array in runtime and store it, i can update that std::array later, it is okay when cardCount = 1
. I want know how to store std::arrays when card cardCount > 1
count increases and all of the arrays needs to update in runtime.
-update I am creating a console app. It is a bingo app after some numbers between 1 - 90 randomly picked. I need to remove those numbers from arrays and update them in console. So i need to reach those arrays that created before.