linux 仿windows pause指令


#include 
#include 
#include 
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指令)