Show a pause in VS

How to show a pause in command line in Visual Studio, I figure out 3 kinds of solution like below showing. Solution 1: system(“pause”); Solution 2: getchar(); (Need studio.h in include line.) Solution 3: Set a option of your project, Your project/Property Pages/Linker/System/SubSystem –> Console(/SUBSYSTEM:CONSOLE) After above setting you can …

volatile

就象大家更熟悉的const一样,volatile是一个类型修饰符(type specifier)。它是被设计用来修饰被不同线程访问和修改的变量。如果没有volatile,基本上会导致这样的结果:要么无法编写多线程程序,要么编译器失去大量优化的机会。