c++cncursescursespdcurses

What can I replace with the sleep command in the Windows variant of ncurses?


#include <curses.h>
#include <unistd.h>
#include <iostream>
int main() {
    initscr();
    mvaddstr(10, 10, "Hello, world");
    refresh();
    sleep(4);
    endwin();
    std::cout << "DONE\n";
}

I'm working on a project and I need to take down the curses windows for a while just to write a path to directory in cmd and then let the curses windows come back. I found this code on this site and tried to use sleep command in the code but it didn't work.

So if anyone knew how to solve this please write it down here. Thnx :)


Solution

  • napms is the (portable) curses function to use instead of sleep