#71 getch has no respond


Well, I'm trying this library to avoid the portable issue
that comes with conio.h if you need a getch() in your program.

The thing is, I can't get this hello world applicaiton to work as I intended:

#include <stdio.h>
#include "curses.h"

int main(int argc, char* argv[])
printf("Hello World!\n");
return 0;

This little program never wait for my input in real action, as if there's no call to getch().
(getchar functioned normally, however.)

I'm using the library on WinXP with the classical Vc++6.


  • William McBrine

    William McBrine - 2010-01-24

    You can't really use curses that way -- it's almost more of a framework than a library. At a minimum, you have to call initscr() before you do anything else with curses. After that, you should really do all your I/O through curses, and not mix it with stdio -- so, use printw() instead of printf(). And be sure to call endwin() on your way out.

  • William McBrine

    William McBrine - 2010-01-24
    • assigned_to: nobody --> wmcbrine
    • status: open --> closed-invalid

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks