gpt4 book ai didi

c - backspace\b 在 C 格式字符串中\n 之前不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 02:02:14 25 4
gpt4 key购买 nike

<分区>

忽略换行符之前字符串末尾的 C 字符串中的退格转义字符(在 Mac OS X 终端中)。

printf("hello, worl\bd"); // => hello word (OK)
printf("hello, world\b"); // => hello worl (OK)
printf("hello, world\b\n"); // => hello world\n (Why not hello worl\n ?)

为什么会这样?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com