自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 STL容器利用merge合并自定义数据类型容器时报错:no matching member function for call to ‘construct‘

报错入下图所示:代码为:#include <iostream>#include <string>#include <algorithm>#include <vector>using namespace std;//merge 两个容器元素合并,并存储到另一个容器中/*函数原型:merge(iterator beg1, iterator end1, iterator beg2, iterator end2, iterator

2021-07-19 00:17:16 1259 6

原创 C++ map容器降序编译报错:error: no matching function for call to object of type ‘const MyCompare‘

今天在学习C++的map容器排序时,跟着老师的课程做map容器的降序排序时编译报错,报错提示:error: no matching function for call to object of type 'const MyCompare'对着老师的代码看了半天,确认一个字符都没有敲错。但是视频中老师的可以正常输出,我这一摸一样的代码确报错。搞的很是恼火。。。我的代码:#include <iostream>#include <string>#include &l

2021-07-12 01:37:21 1417 2

原创 C++警告 comparison between NULL and non-pointer (‘int‘ and NULL) [-Wnull-arithmetic] 解决方法

学习C++时,在判断int类型的m_EmpNum是否为空时,编译器报警:comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic]

2021-06-20 21:33:50 3277

转载 C++ 一行代码判断是否回文字符串

#include <iostream>#include <string>using namespace std;bool test01(string str){ return equal(str.begin(), str.end(), str.rbegin());};int main(){ string str; cin >> str; bool ret = test01(str); if (ret) {.

2021-06-16 19:08:56 229

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除