c语言printf实现同一位置打印输出

您所在的位置:网站首页 c语言如何覆盖输出数据 c语言printf实现同一位置打印输出

c语言printf实现同一位置打印输出

2024-07-08 17:17| 来源: 网络整理| 查看: 265

控制台同一位置打印输出,例如:进度1%->100%在同一位置显示。刚学习c语言的时候一直想做起来,可惜查询好多资料不行。时隔6年多,空闲之余又想起这个问题,便决定一试,虽然c语言已经几乎忘光了,呵呵。最终还是搞定了,这次运气不错,哈哈! ^_^

#include #include //#include //linux for sleep(seconds) and usleep(Microsecond) //#include //windows for Sleep(millisecond) //#include //创建线程函数返回类型 pthread_t thread[1]; /** * 线程函数 **/ void *printThread(){ printf("%s\n","线程开始处理任务"); printf("已经处理了:"); for(int i = 1; i 0){ } } return 1; }

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3