Hey all, first off, I'm NOT looking for answers to my homework by any means. I am rather looking for guidance. I want to understand the material rather than just have the solution handed to me. Therefore, here's my problem: I have a project where I have to read info from a data file, print it out in two separate parallel (1D) arrays, and that's pretty much it for now. Here's my code (remember, I am a beginner with a capital B) so please any advice and/or guidance would help tremendously. Thanks for your help.
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
const int NUM_WORDS = 154;
typedef string PigWords[NUM_WORDS];
typedef string EngWords[NUM_WORDS];
void PrintDictionary (int, const PigWords, const EngWords);
int main()
{
ifstream inFile;
PigWords pigs;
EngWords engs;
inFile.open("pigData.txt");
if ( !inFile )
{
cout << "Error: Data file could not be opened" << endl;
return (EXIT_FAILURE);
}
PrintDictionary (NUM_WORDS, pigs, engs);
inFile.clear();
inFile.close();
return (EXIT_SUCCESS);
}
void PrintDictionary (int NUM_WORDS, PigWords pigs, EngWords engs)
{
return;
}