On Wednesday 27 August 2008 22:10:40 Christopher Joyner wrote: > I do not get the OK from beep, and flash crashes the program. > This is my code:
First, take a look on the manual page... > > #include <curses.h> > > int main(int argc,char** argv) > { > if(beep()!=OK) > printf("No OK\n"); fflush(stdout); > if(flash()!=OK) > printf("No Flash\n"); fflush(stdout); > return 0; > } Well, try: #include <stdlib.h> #include <stdio.h> #include <curses.h> int main(int argc,char** argv) { /* in curses(3X) manual page... */ initscr(); if (beep() != OK) printf("No OK\n"); fflush(stdout); if (flash() != OK) printf("No Flash\n"); fflush(stdout); return 0; } And read the curses manual page, you forgot to init the screen. > > > > In Love in Jesus Christ, Or Lord and Savior. > > > For God so loved the world, that he gave his only *begotten > Son, that whosoever believeth in him should not perish, but > have everlasting life. --John 3:16 > > > [SNIP] Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | FreeBSD & Linux User | Standards Rocks!
signature.asc
Description: This is a digitally signed message part.