Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6336867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:08:26+00:00 2026-05-24T19:08:26+00:00

I just moved to Linux for just a month. I’ve used Borland Turbo C

  • 0

I just moved to Linux for just a month. I’ve used Borland Turbo C for C programming but some of these functions do not work in GNU/Linux, so looking for help.

These are some of the functions I would like to replace:
– gotoxy
– cprintf
– clrscr
– initgraph/graphics.h

I would appreciate some code examples showing how to use any replacements.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:08:26+00:00Added an answer on May 24, 2026 at 7:08 pm

    In linux, you can use the ncurses library to use the terminal as a text buffer: move the cursor around, and write text. It can also draw windows and other hi-level widgets.

    For gotoxy see move and wmove from ncurses (link).
    For cprintf see printw.
    You can clear the screen simply with clear().

    In ncurses you also need to refresh the screen with refresh() after printw and clear().

    Example program, which uses all the mentioned functions in ncurses:

    #include <curses.h>
    
    int main(int argc, char *argv[])
    {
        initscr();
        clear();
        move(15, 20);
        printw("Test program: %s", argv[0]);
        refresh();
        getch();
        endwin();
        return 0;
    }
    

    Compile in gcc with: gcc program.c -lcurses

    As for graphics, you have to choose a particular library.
    If you need a similar experience as the low-level graphics.h, you are probably looking for directfb or svgalib.
    If you want to render graphics in a window, SDL will be helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just moved the dev site over to my linux server for production
We just moved over to Git from SVN. In trying to clean up some
I've just moved onto a new machine. On my old work horse, I had
I've just moved over from shared to dedicated hosting, and suddenly POST is not
Just moved a symfony project from local (win) to server (linux), and the icons
I just moved from .net development to LINUX MONO development... and i don have
I just moved from Windows to Linux and I'm try to create a simple
I have just moved a silverstripe install to a new joyent smartos server. Not
I have just started to teach myself x86 assembly on linux from these video
this code compiles in Linux but not Solaris, because apparently ppoll() is Linux specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.