Start New Discussion within our Software Development Community

I am writing a program to create a window and a box in which the statements are printed
but i am unable to get the correct out put.

some times after executing the program its showing the commad line but what ever the commands i enter are not visible at command line but are working as usual.(if i type clear the screen is getting cleared and logout closing the terminal and so on.)

i request forum to help me in this regard.

i believe i also require some window and screen basics like x , and y coordinates and height and width of the screen so that i can choose correct screen positions.
please provide some source where i get basics related to screen positions and windows and other coordinated to manipulate and understand windows.

i dont know whether this statement works correctly or not.

Nwin = newwin (10, 10, 5, 8);
box(Nwin ,ACS_VLINE, ACS_HLINE);
what does the macros indicate (ACS_VLINE, ACS_HLINE).


please help me.

i am using the following program.

#include<ncurses.h>
int main()
{
        char ch;
        int x , y;
        WINDOW *Nwin ;
        initscr();
        Nwin = newwin (10, 10, 5, 8);
        box(Nwin ,ACS_VLINE, ACS_HLINE);
        getyx(Nwin ,x, y);
        printw("x = %d and y = %d \n", x, y);
        printw("Enter a character:\n");
        ch = getch();
        refresh();
        wrefresh(Nwin);
        endwin();
	delwin(Nwin);
        printf("this is on stdot\n");
        getchar();
        return 0;
}
This article has been dead for over six months. Start a new discussion instead.