Finally with some experiments, I can make the getchar() works as my expectation. By putting getchar() and cin.get() together. So, my code becomes like this:
Code:
#include <ncurses.h>
#include <iostream>
using namespace std;
#include <stdlib.h>
void menu();
int main() {
int stop(0);
int choice;
while (stop == 0) {
Leave a comment: