I am having trouble getting Windows to open the file "results1.txt" in the directory "Result Sets".
When I run it I get the error:
"results1.txt" is not a recognized as an internal or external command, operable program or batch file.
But when I check to see if the file is in the directory it is.
The executable is the a folder one up from the folder "Result Sets".
Here's the code.
case 14:
fout.clear();
file2.clear();
out.clear();
file2 = "results";
filePath2 = "Result Sets\\";
counter2++;
out << counter2;
file2 += out.str();
file2 += ext2;
filePath2 += file2;
fout.open(filePath2.c_str());
if (fout.fail())
cout << endl << "File could not be created..." << endl << endl;
else
{
fout << "Results for " << file << "." << endl << endl;
list.getFront(temp);
forList.avg(temp, counter);
fout << "The mean value is: [ " << forList.getAvg() << " ]." << endl;
list.getFront(temp);
forList.med(temp, counter);
fout << "The median value is: [ " << forList.getMed() << " ]." << endl;
list.getFront(temp);
forList.min(temp);
fout << "The minimum value is: [ " << forList.getMin() << " ]." << endl;
list.getBack(temp);
forList.max(temp);
fout << "The maximum value is: [ " << forList.getMax() << " ]." << endl;
list.getFront(temp);
forList.q1(temp, counter);
fout << "The first quartile is: [ " << forList.getQ1() << " ]." << endl;
list.getFront(temp);
forList.q3(temp, counter);
fout << "The third quartile value is: [ " << forList.getQ3() << " ]." << endl;
list.getFront(temp);
list.getBack(temp2);
forList.rng(temp, temp2);
fout << "The range value is: [ " << forList.getRng() << " ]." << endl;
cout << "All computations are complete, and have been written to the file " << file2 << "." << endl;
cout << "Close " << file2 << " to continue..." << endl << endl;
}
fout.close();
system("cd Result Sets");
system(file2.c_str());
break;
Any help would be great! Thanks!