这里写自定义目录标题 【学习记录】codeblock里延个时 【学习记录】codeblock里延个时 codeblock里使用mingw编译器,sleep不能和VS一样使用 解决方法: include <windows.h> 函数名:Sleep S大写 #include <stdio.h> #include <stdlib.h> #include <windows.h> int main() { int i=0; while(i<1000) { Sleep(10); printf("%4d\r",i); i++; } return 0; }