Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7019467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:11:14+00:00 2026-05-27T23:11:14+00:00

I created an accountant program that basically lets the user add rows and does

  • 0

I created an accountant program that basically lets the user add rows and does some math. My problem is, I need to make it so it prints the table on paper once the user presses a button. How can I accomplish that? Please explain it step-by-step as I’m a beginner.

EDIT: Why was this question voted down. What is wrong with it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:11:15+00:00Added an answer on May 27, 2026 at 11:11 pm

    The basic output tool in C++ is std::ostream, but it is very limited.
    It’s possible (but not always easy) to format tables using it if the
    output is using a fixed width font, but this is rarely the case today.
    If you can get away with using a fixed width font, the manipulators of
    iostream should be sufficient; decide the width of each column, and set
    the width (and alignment—left or right) using the appropriate
    manipulators when you output the field.

    Otherwise, you’ll have to determine what markup language the printed
    output should use—Postscript is widespread, but far from univeral.
    Having done that, you’ll have to iterate over lines, and in each line,
    over the columns, generating the correct markup for each one. If you’re
    generating something like Postscript (or most printer markup languages),
    you’ll have to keep track of absolute positions, and maybe calculate
    column width and such, determining the width of each field depending on
    the font being used and the width of each character in that font.
    More than one program I’ve seen has output a LaTeX source, and then used
    system to invoke LaTeX (or pdflatex, to generate PDF); this supposes
    that LaTeX is installed on all of the machines one which the program
    will run, but LaTeX will take care of all of the above calculations; you
    just output your columns, separated by a '&', with each line
    terminated by two '\', with the appropriate surrounding commands, and
    LaTeX does the rest. (This is the solution I’d recommend, if you can
    possibly impose the presence of LaTeX. As old and as un-user-friendly
    as it is, LaTeX still generates the best output of any program I’ve
    tried.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make a program that can read and edit certain .cdb files
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created an Interop user control in VS2005. When the user control is shown
I'd like to make a delegate that invokes a specific instance method, unfortunately, it
I have created a VB.Net lending application for a cooperative that caters to widows.
I am having a cookie problem in the below example. the cookie does get
I have an accounting program that generates reports and saves them in excel file.
We've created a jqGrid TreeGrid that represents a filesystem, where branches are folders and
I have created a query that looks like this but I havent found a
I need to create an ASP.net page that has a control on the page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.