#include <stdio.h>
#include <termios.h>
#include <unistd.h>
int main()
{
printf("Press any key to continue") ;
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);
return 0;
};
在Linux端使用windows的system pause
最新推荐文章于 2023-12-07 23:25:38 发布