How to add the ncurses.h to a C++ program compiled on gcc?

26,761

on ubuntu:

install ncurses library (packages for developers has "-dev" postfix)

sudo apt-get install libncurses5-dev

for each package, in /usr/share/doc/{package name}/ you can find documentation.

Open this URL file:///usr/share/doc/libncurses5-dev/html/index.html in your browser.

Have fun.

Share:
26,761

Related videos on Youtube

prometheuspk
Author by

prometheuspk

Out of the night that covers me, Black as the pit from pole to pole, I thank whatever gods may be For my unconquerable soul. In the fell clutch of circumstance I have not winced nor cried aloud. Under the bludgeonings of chance My head is bloody, but unbowed. Beyond this place of wrath and tears Looms but the Horror of the shade, And yet the menace of the years Finds and shall find me unafraid. It matters not how strait the gate, How charged with punishments the scroll, I am the master of my fate: I am the captain of my soul. Invictus - William Ernest Henley

Updated on September 18, 2022

Comments

  • prometheuspk
    prometheuspk almost 2 years

    I am totally new to C++ programming on gcc. I wanted to add color to my text on the output on the console. Since there is no conio.h on linux, I researched and found that ncurses.h could do the trick. Now the only problem is that I do not know how to download it and then add the library. Can someone please describe the method?

    Also, if anybody can describe whether ncurses.h is a better option than curses.h or if I am completely wrong in using curses.h?

  • Agi Hammerthief
    Agi Hammerthief over 5 years
    In the unlikely event that the documentation for ncurses doesn't prove sufficiently helpful, you can always pick up a copy of Dan Gookin's Programmer's Guide to nCurses