The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

2. The Hello World Program

Welcome to the world of curses. Before we plunge into the library and look into its various features, bells and whistles, let's write a simple program and say hello to the world.

2.1. Compiling With the Ncurses Library

To use ncurses library functions, you have to include ncurses.h and to link the program with ncurses library the flag -lncurses should be added. ncurses.h already includes stdio.h.

    #include <ncurses.h>
    .
    .
    .

    compile and link: gcc <program file> -lncurses

2.2. Dissection

The above program prints "Hello World !!!" to the screen and exits. This program shows how to initialize curses and do screen manipulation and end curses mode. Let's dissect it line by line.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру