![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++技巧
YFC_chen
希望,乐观,热情
展开
-
C++ switch case 匹配字符串
有时候,我们想写出下面这样的switch语句:const char* str = "first"; switch(str){ case "first": cout << "1st one" << endl; break; case "second": cout << "2nd one" << en...转载 2019-05-05 15:47:51 · 3385 阅读 · 0 评论 -
C++ 基础知识
一、类型转换float f = 3.14f;int i1 = (int)f;int i2 = int(f);int i3 = static_cast<int>(f); 推荐二、string转int三、int转string原创 2019-06-12 16:29:19 · 62 阅读 · 0 评论