Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

I'm a student, please help!!!

I'm a student, please help!!!

I'm a student, please help!!!

I am trying to create a tab function so that when outputing to a printer I can specify which column to go to. A function like this would simplify things greatly. I'm not exactly sure where to start? Any ideas? Or is there something out there like this already?

RE: I'm a student, please help!!!

try setw

RE: I'm a student, please help!!!

setw() is kindof a hassle. I would like to write a function or find one that i can just output some data and then tab over to column 15 then when I output that field, tab over to column 35 and so forth without all the trouble of setting setw(). Is there anyway to do this? I had been able to work this out kindof by converting numerical data to text and getting the string length. But it only works when I'm outputting variables, If I want to hardcode any special characters it throws my count off. Is there any what to get from the output device (the printer) what column it's at and have it go out to next column specified? Sort of like the tab statement in QBasic?

RE: I'm a student, please help!!!

could you possibly use "\t" in a cout line to set your tabs?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close