Sending output to a printer
-
This program works ok. I get an exe file. But I would like to be able to send the output to a printer. How would I be able to send the output from the exe file after running it, to a printer? I have some code by the forward slashes. Thank You // RWA's and Charges #include #include #include #include using std::cout; using std::cin; using std::fixed; using namespace std; //#include int main () //int,char*) //ofstream printer ("lpt1:"); //Printer <<"test"<> ans; cin.ignore(); if (ans == 'A' || ans == 'a' ){ cout << "\nEnter RWA Base Estimate, then press the enter key:$\a"; cin >> input; cout << "You entered:$" << input << endl; int pos = input.find(','); while (pos != -1) { input.replace(pos, 1, ""); pos = input.find(','); } number = atoi(input.c_str()); fee = number * 0.04; cout << fixed; cout.precision(2); cout << "4% Management Fee:$" << fee <<"\n"; total = number + fee; cout << fixed; cout.precision(2); cout << "Total:$" << total <<"\n"; if (total >= 1 && total <= 2499) { cout << fixed; cout.precision(2); cout << "Overhead:$" << total*0.1 <<"\n"; cout << "Total Obligation:$" << total + (total * 0.1) <<"\n"; } if (total >= 2500 && total <= 9999) { cout << fixed; cout.precision(2); cout << "Overhead:$" << total*0.09 <<"\n"; cout << "Total Obligation:$" << total + (total * 0.09) <<"\n"; } if (total >= 10000 && total <= 24999) { cout << fixed; cout.precision(2); cout << "Overhead:$" << total*0.08 <<"\n"; cout << "Total Obligation:$" << total + (total * 0.08) <<"\n"; } if (total >= 25000 && total <= 49999) { cout << fixed; cout.precision(2); cout << "Overhead:$" << total*0.07 <<"\n"; cout << "Total Obligation:$" << total + (total * 0.07) <<"\n"; } if (total >= 50000 && total <= 99999) { cout << fixed; cout.precision(2); cout << "Overhead:$" << total*0.05 <<"\n"; cout << "Total Obligation:$" << total + (total * 0.05) <<"\n"; } if (total >= 100000 && total <= 299999) { cout