Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 C 中初始化新行字符?
例如,要初始化 char A:
char letter = 'A';
如何初始化新行?可能像这样:
char newLine = '0x0A'?
使用这样的转义字符:
char letter = '\n';
我更喜欢你阅读New Line,它完全解释了 \n \r 和 UNIX EOL 和 WINDOWS EOL。非常好。