Yes If you are allowed to use STL's list, then list<account> listOfAccounts
will do
fruitymo commented: Thank you for this! I understood the fact that char*** is a pointer to 2D array of chars but I struggled to allocate memory for all 3 dimensions. This comment has been of great help. +0