见证自己的成长
8.5 像个傻子一样重新开始
今天遇到的问题
1、int 32位, short int = int;
2、出现这个警告
warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
是因为 scanf 里没有加 & (好多年没敲C,但是这个还是得记得)
3、出现这个错误
error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'|
是因为%s只能用于C里的输出,所以要把C++ String 转化成C string
string s = "ILoveYou";
s.c_str();
4、数字和字符串的转化,简洁明了,一目了然
感谢此篇博文
5、写题写的入了魂了,加油吧,甲级不是那么好过的哈哈