首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

please expain this sentence "fscanf(fd, "%*[^\n]");"该怎么处理

2012-02-29 
please expain this sentence fscanf(fd, %*[^\n])Whatisthemeaningofthe*format*informaiton?3ks[解

please expain this sentence "fscanf(fd, "%*[^\n]");"
What   is   the   meaning   of   the   *format*   informaiton?
3ks

[解决办法]
"%[^\n] "表示读输入字符串,直到碰到字符‘\n’为止,其中^表示否的意思; "%[abc] "表示只读字母为 'a '、 'b '、 'c '的字符串,碰到不是这些字符就结束,如输入字符串为“abbacdab”,那么得到的字符串就是abbac了。
[解决办法]
利用正则表达式匹配。。某些 libc 的扩展。

热点排行