Set cursor position

This is a discussion on Set cursor position within the C++ Programming forums, part of the General Programming Boards category; Hey Everybody! How can I set the position of cursor, if I use Windows OS ? For example, if I ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    10

    Set cursor position

    Hey Everybody!

    How can I set the position of cursor, if I use Windows OS ?

    For example, if I use this code:

    Code:

    Code:
    int a;
        int b;
        
        cout << setw(3) << "";
        cin >> a;
        cout << setw(21) << a;
        cin >> b;
        cout << endl;
    When I write the variable "a" on the screen, the program jump to the next line. How can I continue in the same line ?

    Thanks!

  2. #2
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    493
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    10
    Thanks man!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 01-18-2008, 03:06 AM
  2. The new FAQ
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 08-30-2006, 10:05 AM
  3. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  5. Set default directory with GetTempDir?
    By Bajanine in forum Windows Programming
    Replies: 2
    Last Post: 05-04-2003, 11:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21