everyone. I'm working on a language translator program, my first task is to create a 2D array of French and English words from a file of 1000 translations. The file looks something like this:
1000
bonjour,hello
oui,yes
non,no
merci,thanks
this is what I've tried:
string langArray[2][num];
for(int i = 0; i < 2; i++)
{
for(int j = 0; j < 1000; j++)
{
inFile >> langArray[i][j];
cout << langArray[i][j] << " " << endl;
}
}
but its storing the whole line and not the words separately, so I need to figure out how to store the French words on one line of the array and the English words in the second line without that pesky comma.