Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Printing Output

Printing Output

Scheduled Pinned Locked Moved C / C++ / MFC
c++json
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BRIMID
    wrote on last edited by
    #1

    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"<

    P 1 Reply Last reply
    0
    • B BRIMID

      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"<

      P Offline
      P Offline
      PJ Arends
      wrote on last edited by
      #2

      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!_

      B 1 Reply Last reply
      0
      • P PJ Arends

        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!_

        B Offline
        B Offline
        BRIMID
        wrote on last edited by
        #3

        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"<

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups