void printWords( string arr[], int cnt );
void selectionSort( string arr[], int cnt );
int main( int argc, char**argv )
{
if (argc < 2 )
{
cout << "Hey you idiot! put the filename after the a.exe!\nLIKE THIS: a.exe words.txt\n";
exit(0);
}
ifstream infile;
infile.open( argv[1], ios::in );
if (!infile)
{
cout << "\nIO error attempting to open argv[1]\n";
exit(0);
}
int wordCnt=0;
string word;
string wordList[MAX_WORDS];
while( wordCnt < MAX_WORDS && infile >> word )
wordList[wordCnt++] = word;
infile.close(); // Done reading. Close it