Printing Output
-
I have written a program in C++. When I run the program it gives me an exe file. I would like to know what code I can enter which would give the user the option to print the output. Forward slashes represent the code I entered. I get many errors with this code. If you need the rest of the programs code to assist me let me know and I will send it. #include #include #include #include using std::cout; using std::cin; using std::fixed; using namespace std; //#include int main() //(int,char*) //{ //ofstream printer ("1pt1:"); //Printer <<"test"<
-
I have written a program in C++. When I run the program it gives me an exe file. I would like to know what code I can enter which would give the user the option to print the output. Forward slashes represent the code I entered. I get many errors with this code. If you need the rest of the programs code to assist me let me know and I will send it. #include #include #include #include using std::cout; using std::cin; using std::fixed; using namespace std; //#include int main() //(int,char*) //{ //ofstream printer ("1pt1:"); //Printer <<"test"<
BRIMID wrote: _//ofstream printer ("1pt1:"); //Printer <<"test"< The first letter in "lpt1" is a lower case 'L' not a one. C++ is case sensitive in variable names: printer vs Printer. main() has to return an integer 0 (zero) not the letter 'o'. ps. when posting code your include files are being dropped. What you should do is click on the "Do not treat <'s as HTML tags" check box that is located immediately below the text edit window used to enter messages.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!_
-
BRIMID wrote: _//ofstream printer ("1pt1:"); //Printer <<"test"< The first letter in "lpt1" is a lower case 'L' not a one. C++ is case sensitive in variable names: printer vs Printer. main() has to return an integer 0 (zero) not the letter 'o'. ps. when posting code your include files are being dropped. What you should do is click on the "Do not treat <'s as HTML tags" check box that is located immediately below the text edit window used to enter messages.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!_
This is the code and it does not work. I am getting 5 error messages when compiling. If someone could give me assistance from //#include to //{ I would appreciate it. Do I have the function in the right place? That sort of thing. You guys have really been helpful. #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"<