当前位置:网站首页>StrError & PERROR use yyds dry inventory
StrError & PERROR use yyds dry inventory
2022-07-06 03:08:00 【Mango_ Mango】
summary :
strlen - Library function for finding string length
strcpy- String copy function
strcat - character string ( Connect ) Append function
strncpy() - String copy function - Can control the number of characters copied
strncat() - String append function
strncmp() - String comparison function
strstr - String lookup function
strtok - String cutting
memcpy()- Memory copy function
memmove- Memory copy function ( Can handle overlapping memory copies )
memcmp: Memory compare function
memset - Memory setting function
strerror- Can return C The error message corresponding to the error code built in the language
perror - Print custom content +strerror
Error message reporting function
strerror- Can return C The error message corresponding to the error code built in the language
Return the error information corresponding to the error code
Parameter error code , Translate into error message , The first character address of the error message string corresponding to the error code is returned
C When a language library function call fails , Will store the error code in errno variable
application :
Since we don't have this file : So print the results
No such file or directory
perror - Print custom content +strerror
string: Custom characters
Print the results :
If perror There's something in , Print content first , Then automatically add a colon after it : Then print the error message
shortcoming : Print when you don't want to print
边栏推荐
- The difference between sizeof and strlen in C language
- Referenceerror: primordials is not defined error resolution
- Huawei, H3C, Cisco command comparison, mind map form from the basic, switching, routing three directions [transferred from wechat official account network technology alliance station]
- 2.12 simulation
- Pat 1084 broken keyboard (20 points) string find
- Day 50 - install vsftpd on ceontos6.8
- Maturity of master data management (MDM)
- 华为、H3C、思科命令对比,思维导图形式从基础、交换、路由三大方向介绍【转自微信公众号网络技术联盟站】
- Software design principles
- Fault analysis | analysis of an example of MySQL running out of host memory
猜你喜欢
[concept] Web basic concept cognition
Huawei, H3C, Cisco command comparison, mind map form from the basic, switching, routing three directions [transferred from wechat official account network technology alliance station]
[unity3d] GUI control
Master data management theory and Practice
Analyze 菜单分析
Codeworks 5 questions per day (1700 average) - day 6
What is the investment value of iFLYTEK, which does not make money?
解决:AttributeError: ‘str‘ object has no attribute ‘decode‘
1. Dynamic parameters of function: *args, **kwargs
RobotFramework入门(二)appUI自动化之app启动
随机推荐
Differences and application scenarios between resulttype and resultmap
XSS challenges bypass the protection strategy for XSS injection
MySQL learning notes-10-tablespace recycling
jsscript
Microservice registration and discovery
Redis SDS principle
How to do function test well
Solution: attributeerror: 'STR' object has no attribute 'decode‘
Is there a completely independent localization database technology
主数据管理(MDM)的成熟度
Problems encountered in 2022 work IV
解决:AttributeError: ‘str‘ object has no attribute ‘decode‘
Performance test method of bank core business system
电机控制反Park变换和反Clarke变换公式推导
原型图设计
Introduction to robotframework (I) brief introduction and use
有没有完全自主的国产化数据库技术
全国大学生信息安全赛创新实践赛初赛---misc(永恒的夜)
[ruoyi] set theme style
Polymorphic day02