Thread: Help with alternative of gotoxy()

  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
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Is their anything defined in standard C++ which may help me to do so.
    No.

    You'd need to use a library like ncurses.

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    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, 05:14 PM
  5. gotoxy
    By Sekti in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2002, 07:00 PM