const int DMAX = 173000;
const int JMAX = 50;
void loadArray( string a[], int &cnt, int cap, ifstream &infile, string filename );
int main( int argc, char**argv )
{
if (argc < 3 )
{
cout << " Hey you idiot! put the filenames after the a.exe!";
cout << "\nLIKE THIS: a.exe dictionary.txt jumbles.txt\n";
exit(0);
}
ifstream infile;
string dict[DMAX]; int dCnt=0;
string jumb[JMAX]; int jCnt=0;
for( int i=0 ; i< jCnt ; i++ )
{
cout << jumb[i] << " ";
// make a jsorted copy of the jWord
// for each dWord in the dict array
// {
// make a dSorted copy of the dWord
// if jSorted == dSorted
// print dWord
// }
//
cout << endl;
}
cout << "\nElapsed time in seconds: " << float( clock () - start_time ) / CLOCKS_PER_SEC;
return 0;
} // END MAIN //###############################################################
void loadArray( string a[], int &cnt, int cap, ifstream &infile, string filename )
{
infile.open( filename.c_str(), ios::in );
while( cnt < cap && infile >> a[cnt] )
cnt++;
infile.close(); // Done reading. Close it
}