Treating Unicode character as whitespace

本文详细解释了在将文本复制到Xcode中时遇到的TreatingUnicodecharacteraswhitespace警告。文章建议仔细检查复制的文本,特别是回车和空格字符,通常直接删除并重新输入这些部分可以解决此问题。

Treating Unicode character as whitespace

在我们 copy 一些文本到 Xcode 里面的时候会有 Treating Unicode character as whitespace 的警告,此时认真检查你 copy 的文本部分,回车、空格是否有问题。当然一般检查不出来,直接删除回车和空格的部分,自己重新输入即可。

转: 原链接地址

compileOutput: main.cpp:2:9: warning: treating Unicode character as identifier character rather than as '<' symbol [-Wunicode-homoglyph] #include<string> ^~ main.cpp:2:18: warning: treating Unicode character as identifier character rather than as '>' symbol [-Wunicode-homoglyph] #include<string> ^~ main.cpp:2:2: error: invalid preprocessing directive #include<string> ^ main.cpp:5:1: warning: treating Unicode character as identifier character rather than as '{' symbol [-Wunicode-homoglyph] { ^~ main.cpp:6:7: warning: treating Unicode character as identifier character rather than as ':' symbol [-Wunicode-homoglyph] public: ^~ main.cpp:5:1: error: variable has incomplete type 'class Welcome' { ^ main.cpp:4:7: note: forward declaration of 'Welcome' class Welcome ^ main.cpp:5:4: error: expected ';' after top level declarator { ^ ; main.cpp:7:13: warning: treating Unicode character as identifier character rather than as '(' symbol [-Wunicode-homoglyph] void welcome(); ^~ main.cpp:7:16: warning: treating Unicode character as identifier character rather than as ')' symbol [-Wunicode-homoglyph] void welcome(); ^~ main.cpp:7:19: warning: treating Unicode character as identifier character rather than as ';' symbol [-Wunicode-homoglyph] void welcome(); ^~ main.cpp:9:1: warning: treating Unicode character as identifier character rather than as '}' symbol [-Wunicode-homoglyph] }; ^~ main.cpp:11:9: warning: treating Unicode character as identifier character rather than as '(' symbol [-Wunicode-homoglyph] int main() ^~ main.cpp:11:12: warning: treating Unicode character as identifier character rather than as ')' symbol [-Wunicode-homoglyph] int main() ^~ main.cpp:12:1: warning: treating Unicode character as identifier character rather than as '{' symbol [-Wunicode-homoglyph] { ^~ main.cpp:11:15: error: expected ';' after top level declarator int main() ^ ; main.cpp:15:1: error: expected unqualified-id return 0; ^ main.cpp:16:1: warning: treating Unicode character as identifier character rather than as '}' symbol [-Wunicode-homoglyph] }; ^~ main.cpp:16:1: error: C++ requires a type specifier for all declarations main.cpp:17:12: warning: treating Unicode character as identifier character rather than as ':' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:17:15: warning: treating Unicode character as identifier character rather than as ':' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:17:25: warning: treating Unicode character as identifier character rather than as '(' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:17:28: warning: treating Unicode character as identifier character rather than as ')' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:18:1: warning: treating Unicode character as identifier character rather than as '{' symbol [-Wunicode-homoglyph] { ^~ main.cpp:17:6: error: variable has incomplete type 'void' void welcom::Welcome() ^ main.cpp:17:31: error: expected ';' after top level declarator void welcom::Welcome() ^ ; main.cpp:20:1: warning: treating Unicode character as identifier character rather than as '}' symbol [-Wunicode-homoglyph] }; ^~ main.cpp:20:1: error: C++ requires a type specifier for all declarations 18 warnings and 9 errors generated.
最新发布
09-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值