当前位置:网站首页>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
边栏推荐
- My C language learning records (blue bridge) -- files and file input and output
- Analyze 菜单分析
- My C language learning record (blue bridge) -- under the pointer
- Performance analysis of user login TPS low and CPU full
- Gifcam v7.0 minimalist GIF animation recording tool Chinese single file version
- Technology sharing | what if Undo is too big
- [pointer training - eight questions]
- ERA5再分析资料下载攻略
- Apt installation ZABBIX
- MySQL learning notes-10-tablespace recycling
猜你喜欢
How to accurately identify master data?
Referenceerror: primordials is not defined error resolution
Analyze 菜单分析
Installation and use tutorial of cobaltstrike-4.4-k8 modified version
2022工作中遇到的问题四
Analyze menu analysis
Misc (eternal night), the preliminary competition of the innovation practice competition of the National College Students' information security competition
Derivation of anti Park transform and anti Clarke transform formulas for motor control
My C language learning records (blue bridge) -- files and file input and output
codeforces每日5题(均1700)-第六天
随机推荐
PMP practice once a day | don't get lost in the exam -7.5
Daily question brushing plan-2-13 fingertip life
XSS challenges绕过防护策略进行 XSS 注入
codeforces每日5題(均1700)-第六天
codeforces每日5题(均1700)-第六天
Software design principles
Installation and use tutorial of cobaltstrike-4.4-k8 modified version
Redis SDS principle
这些不太会
OCR文字识别方法综述
Mysql database operation
华为、H3C、思科命令对比,思维导图形式从基础、交换、路由三大方向介绍【转自微信公众号网络技术联盟站】
技术分享 | undo 太大了怎么办
Gifcam v7.0 minimalist GIF animation recording tool Chinese single file version
主数据管理(MDM)的成熟度
Eight super classic pointer interview questions (3000 words in detail)
C # create self host webservice
Classic interview question [gem pirate]
#PAT#day10
Prototype design