#include <cstdlib>
#include <unistd.h>
#include <termios.h>
void pausee()
{
printf("\nPress any key to continue\n") ;
struct termios te;
int ch;
tcgetattr( STDIN_FILENO,&te);
te.c_lflag &=~( ICANON|ECHO);
tcsetattr(STDIN_FILENO,TCSANOW,&te);
tcflush(STDIN_FILENO,TCIFLUSH);
fgetc(stdin) ;
te.c_lflag |=( ICANON|ECHO);
tcsetattr(STDIN_FILENO,TCSANOW,&te);
}
linux 仿windows pause指令
最新推荐文章于 2023-07-29 11:00:32 发布