当前位置:网站首页>About the problem of abnormal C printing
About the problem of abnormal C printing
2022-07-27 18:05:00 【h799710】
About c Print abnormal problems
Sometimes I make a mistake , You need to rely on printing to adjust and see the specific error location . But when printing is not enough, it will appear Being misled The situation of .
Let's not talk about other logic , We must first ensure that the logic of printing is correct .
First , Get to know printf This function
It is a line buffer function , When you execute this function , The data will not be printed immediately . But wait printf Buffer full for 1024 Bytes will be printed .
resolvent :
First of all : call Function to flush buffer
printf("hello c11");
fflush(stdout);
second : Add ‘\r’, '\n’ when , The buffer will also be flushed immediately
printf("hello c22\r");
printf("hello c33\n");
Reference article :C++ Explain in detail print Buffer refresh
边栏推荐
- [MCU] 2.2 pin function of AT89S52
- JS to realize the right-click menu bar function
- 知物由学 | 关联图分析在反作弊业务中的应用
- JDBC连接数据库读取前台无法显示数据
- Anaconda uninstall again
- 【cf】#681 A. Kids Seating (Div. 2, based on VK Cup 2019-2020 - Final)
- [introduction to database system (Wang Shan)] Chapter 4 - Database Security
- Fast analysis combined with Haidian medicine
- Notes on standardized management of "ancestral warehouse" of meituan meal
- 数据库超话(四)
猜你喜欢

Convolutional neural network -- from r-cnn, fast r-cnn to fast r-cnn, mask r-cnn

numpy数组矩阵操作
知物由学 | 小游戏的安全风险在哪里?
![[MCU] 2.3 CPU of AT89S52](/img/4c/7b9d235bf8a919339d75a7ec95789f.png)
[MCU] 2.3 CPU of AT89S52

美团到餐“祖传数仓”标准化治理笔记

MySQL view and stored procedure
What are the safety risks of small games?

WebDriverException( selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executabl
知物由学 | SO加固如何提升Android应用的安全性?

Numpy array matrix operation
随机推荐
卷积神经网络之卷积计算过程个人理解
【单片机】2.3 AT89S52的CPU
Knowing things by learning | app slimming down, the way of safety reinforcement under the new generation AAB framework
Oracle 11g数据库安装教程
Mlx90640 infrared thermal imager temperature sensor module development notes (VII)
Help, boost and take responsibility, the new value and significance of the 6th Tuba rabbit 718 national home decoration Festival
树莓派驱动代码的编译和测试
微信小程序 云函数批量删除多条数据 Error: errCode: -502005 database collection not exists
Array of C language
Yyds dry inventory interview must brush top101: specified interval reversal in the linked list
写好技术原创文章的一点建议
Redis: configuring AOF does not work
x-sheet 开发教程:初始化配置自定义布局
vim的配置及基础使用
WebDriverException( selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executabl
Oracle 11g database installation tutorial
知物由学 | 易盾移动端同构实践,几步改善官网交互体验
【单片机】2.1 AT89S52单片机的硬件组成
An end-to-end file upload program based on form, including client and server
Database hyperphone (4)