I have created a program that runs a report of the company's daily sales.
The problem I am having is that the text prints to close to the top and bottom of the page. Is there a way to write code to add extra margins to the top and the bottom?
You're being very vague in your question. Are you talking about standard console output, or something like a Word document getting output? There's no such thing as a "page" if we're just talking about basic console I/O.
Anyway, if you're referring to console output (std::cout), have you tried just adding more newlines before the message?
Ganado,
Thanks for the reply and I apologize for being vague. By "page" I am referring to the actual printed peace of paper that comes from the printer itself.
That's what I was afraid of. Sorry, but that has nothing to do with programming. If you're on windows, cmd doesn't even let you print directly from it...
Copy your output into an actual text processor like Microsoft Word or OpenOffice Writer, and then you can adjust the margins of your paper however you please.
its terribly clunky, but it worked up thru win 7, I have not tried it in a long time but it used to be possible to print text files directly to the printer and probably still is.
a company's daily sales, if this is real and not homework, you may want to wrap the text in simple HTML tags to format the font size/position/etc and such to make a nice looking output, redirect the console output to .html file, open that, and print it from the browser. Should give a very nice result for not much effort (a win / win situation).
as far as console output, you can add empty lines at the top and bottom of 'pages', just cout << endl as needed.
if you did not know,
programname > file
at the command prompt will dump the output to a text file that you can open in anything.
jonnin,
Thanks for the reply.
lol. homework... Nope not homework. I'm 50 years old and graduated from college last year. Now that i'm in the workforce starting my new career, i'm finding that they don't really teach you that much in school. smh.