![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++摘要
文章平均质量分 69
GeoAnt
这个作者很懒,什么都没留下…
展开
-
(地基工)std::string::find() 和 std::string::npos
(地基工)std::string::find() 和 std::string::nposint idx = str.find("abc");if (idx == string::npos)...上述代码中,idx的类型被定义为int,这是错误的,即使定义为 unsigned int 也是错的,它必须定义为 string::size_type。npos 是这样定义的:转载 2014-10-23 22:41:27 · 928 阅读 · 0 评论 -
C++摘要——什么时候使用std::cout,什么时候用std::cerr
What is the difference between cout, cerr, clog of iostream header in c++? When to use which one?stdout and stderr are different streams, even though they both refer to console output by defau原创 2014-10-23 12:49:45 · 2626 阅读 · 0 评论 -
面向接口编程
Abstract Class vs Interface in C++ [duplicate]转载 2014-10-26 12:58:35 · 488 阅读 · 0 评论 -
关于template 的23个问题
发现新大陆,以前慢慢才知道的东西,原来有个集中营:看看updated, 处理方式是这么的好35.1What's the idea behind templates?35.2What's the syntax / semantics for a "class template"?35.3What's the syntax / s原创 2014-10-26 11:39:15 · 758 阅读 · 0 评论