阅读背景:

为什么C ++允许将整数分配给字符串?

来源:互联网 

I encountered an interesting situation today in a program where I inadvertantly assigned an unsigned integer to a std::string. The VisualStudio C++ compiler did not give any warnings or errors about it, but I happened to notice the bug when I ran the project and it gave me junk characters for my string.I encountered an interesting situation today in




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: