Hi everybody, I'm trying to write a little program with some switch statements. I wanted to make a clean and neat menu interface (yeah I know, useless..) by cleaning the console every time the case ends and waiting the user to press a key to continue, but I'm having some troubles. Does exist any function in some library which can do this easily?
Now here's what I tried. The getch and clrscr functions won't work, when compiling it keeps asking to declare them. I tried with system("cls") but still it doesn't compile (I'm not even sure about syntax). I've also tried to use cin.get() for the any key part but it doesn't really do something..
Also, I read that this conio.h is a old non-standard header library, but I'm not really sure of what this means.
1 2 3 4 5 6 7 8 9
#include <iostream>
#include <conio.h>
case 1: {
cout << "Press a key to continue..." << endl;
getch();
clrscr();
break;
}