blinking text

hi every one
i got a problem in blinking text
i tried like this

main()
{
initscr();
move(5,10);
addstr("this is blink->");
addch('H' | A_BLINK);
refresh();
getch();
endwin();
}
an error came like this

[root@localhost 1]# cc r3.c
r3.c: In function �main':
r3.c:6: error: �A_BLINK' undeclared (first use in this function)
r3.c:6: error: (Each undeclared identifier is reported only once
r3.c:6: error: for each function it appears in.)

noway from this code
will u please show me the another best example.

thank you


#include <ncurses.h>

main()
{
        initscr();
        move(5,10);
        addstr("this is blink->");
        addch('H' | A_BLINK);
        refresh();
        getch();
        endwin();
}

Don't forget , about that library :smiley:

ya. thank you for ur feedback
still got the problem showing in terminal

[root@localhost 1]# cc r3.c
/tmp/ccSkklIJ.o(.text+0x1d): In function `main':
r3.c: undefined reference to `initscr'
/tmp/ccSkklIJ.o(.text+0x22):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x2f):r3.c: undefined reference to `wmove'
/tmp/ccSkklIJ.o(.text+0x37):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x47):r3.c: undefined reference to `waddnstr'
/tmp/ccSkklIJ.o(.text+0x4f):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x5d):r3.c: undefined reference to `waddch'
/tmp/ccSkklIJ.o(.text+0x65):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x6e):r3.c: undefined reference to `wrefresh'
/tmp/ccSkklIJ.o(.text+0x76):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x7f):r3.c: undefined reference to `wgetch'
/tmp/ccSkklIJ.o(.text+0x87):r3.c: undefined reference to `endwin'
collect2: ld returned 1 exit status

can u please tell me the another ex:
for this

thank you

SImple dude , when compile , you forget to link ( ncurses library ).

Just compile like this :


cc r3.c -lncurses

thank you very much
it is nice

my out is like

      this is blink-&gt;H

can i ask u another doubt

H was not blinking
is it blink

by which way it will be.

once again thank you

If you look closer to you shell , you'll see that H ( letter ) is in a white-black background .. It is not blinking altough ..( shell rulezz ..)

If you really want it to blink , you can write your own blink code ..

I'll write one , for something to blink ..



#include <ncurses.h>

main(void)
{

initscr();

        for(;;)
        {
                move(LINES/2,COLS/2);
                printf("The whole screen is blinking / flashing ");
                refresh();
                flash();
                sleep(1);
        }

}

cc <pr> lncurses , not really blinking , but flashing , maybe it helps .. :confused: