Help with alternative of gotoxy()

This is a discussion on Help with alternative of gotoxy() within the C++ Programming forums, part of the General Programming Boards category; Please can any one help regarding an alternative for gotoxy function. Like in the this program snippet I wish to ...

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    32

    Exclamation Help with alternative of gotoxy()

    Please can any one help regarding an alternative for gotoxy function. Like in the this program snippet I wish to goto the previous line . Is their anything defined in standard C++ which may help me to do so.

    Code:
    #include<iostream.h>
    #include<conio.h>
    
    int main()
    {
               clrscr();
               
               
               for( int i=0;i<=79;++i)
               {
                    
                    if(i==0)
                     cout<<char(201);                                              
                    else if(i==79)
                     cout<<char(187);
                    else
                     cout<<char(205); 
               }
                       
               getch();
               
               for( int i=0;i<20;++i)
               {
                     cout<<"\b";
               }      
               
               getch();
    }

  2. #2
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Is their anything defined in standard C++ which may help me to do so.
    No.

    You'd need to use a library like ncurses.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,888
    Use platform specific APIs.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Any alternative?
    By sCandal2 in forum Windows Programming
    Replies: 4
    Last Post: 01-11-2006, 04:30 PM
  2. gotoxy alternative?
    By krappykoder in forum C Programming
    Replies: 7
    Last Post: 12-09-2005, 07:36 AM
  3. gets() alternative
    By Mastadex in forum C Programming
    Replies: 5
    Last Post: 12-12-2004, 12:28 AM
  4. alternative to cin
    By Unregistered in forum C++ Programming
    Replies: 18
    Last Post: 06-25-2002, 06:14 PM
  5. gotoxy
    By Sekti in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2002, 07:00 PM

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