int _tmain(int argc, _TCHAR* argv[]) { //insert breakpoints and step through the code to see the flow of operation Creator* creator = new ConcreteCreator(); creator->AnOperation(); delete creator; return 0; }
int main(int argc,char* argv[]) { Creator *p = new ConcreateCreator(); p->AnOperation(); delete p; //system("pause"); 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; }