I have a 2 dimensional array and I want it to contain the lines from a file.
In my main function I have:
const int listSize = 5;
char cardList[listSize][25];
buildList(cardList, inData);
header file contains:
void buildList(char (*array)[25], std::ifstream&);
buildList is defined (updated):
void buildList(char (*array)[25], ifstream& inputFile){
for (int i = 0; i < 5; i++)
inputFile >> array[i];
}
I keep getting:
cannot convert 'char (*)[25]' to 'char**' for argument '1' to 'void buildList(char**, std::ifstream&)'
Thanks for the help.