Usando il codice (preso dalla pagina
http://www.cplusplus.com/forum/general/3570 ) e avendo sostituito conio.h con ncurses.h:
#include <iostream>
#include <string>
#include <ncurses.h>
using namespace std;
int main(){
string pass ="";
char ch;
cout << "Enter pass\n";
ch = _getch();
while(ch != 13){//character 13 is enter
pass.push_back(ch);
cout << '*';
ch = _getch();
}
if(pass == "Mitsakos"){
cout << "\nAccess granted \n";
}else{
cout << "\nAccess aborted...\n";
}
}
Ho questo errore:
fatal error: ncurses.h: File o directory non esistente
#include <ncurses.h>
^~~~~~~~~~~
compilation terminated.