腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
对于
第一个
参数
,
没有
已知
的
从
“
const
value_type
”
到
“
const
void
*”
的
转换
、
、
、
错误发生在cout<<(*it);行候选函数不可行:
对于
第一个
参数
,
没有
已知
从
'
const
value_type
‘(也称为&
浏览 2
提问于2018-01-17
得票数 1
回答已采纳
2
回答
atoi(textline[c])遍历getline?
、
我刚开始接触C++,我能做些什么来做这样
的
事情int i = 0;错误:不匹配函数调用'atoi‘int n= atoi(txtlinei);^~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
浏览 4
提问于2015-06-26
得票数 1
回答已采纳
4
回答
c++
的
构造函数中
的
常量字符串名称和字符串名称不同
、
所以我创建了一个名为Person
的
类。我想知道
const
string &name和string name有什么不同。我试着只放入string &name,但它给了我一个错误信息。候选构造函数(隐式复制构造函数)无效:
对于
第一个
参数
,
没有
已知
的</
浏览 3
提问于2014-02-07
得票数 1
1
回答
以自定义类为键
的
Unordered_map
、
、
我现在正在编写编译器,我试图通过继承unordered_map来表示范围类,因为它本质上是声明符号
的
哈希表。我在符号中添加了一个自定义哈希函数,但是我收到了一个错误,它抱怨初始化std::pair
没有
默认
的
构造函数。public: /// Returnsiter == end())
浏览 0
提问于2018-12-13
得票数 0
回答已采纳
2
回答
带有std::function
参数
的
重载运算符
、
、
、
、
但是,如果我想将std::function添加为另一个受支持
的
类型(用于回调),则编译器会抱怨: MT.h:31:7:候选函数(隐式副本赋值操作符)不可行:
对于
第一个
参数
,
从
'(lambda at MT.cpp:426:17)‘
到
'
const
::MT’之间
没有
已知
的
转换
MT.h:31:7:候
浏览 0
提问于2016-08-28
得票数 5
回答已采纳
2
回答
错误:
从
'
void
*‘
到
'int (*)
的
转换
无效(
const
void
*,
const
void
*)’
在编译我
的
C文件时,我得到了以下错误:error: initializing argument 1 of '
void
* bsearch(int (*)(
const
void
*,
const
void<
浏览 0
提问于2015-01-23
得票数 0
回答已采纳
1
回答
参数
1
从
“
const
pcl::PCLPointField”
到
“
const
&”之间
没有
已知
的
转换
、
211:69: required from ‘bool ceres::AutoDiffCostFunction<CostFunctor, kNumResiduals, Ns>::Evaluate(
const
double*
const
*, double*, double**)
const
[with CostFunctor = ReprojectionError3D; int kNumResiduals:__cxx11::basic_string<char>]::<lambda(
const
浏览 43
提问于2022-07-11
得票数 0
1
回答
无法在Clang上将std::reference<T>
转换
为std::reference<
const
T>
、
、
、
、
注释,
从
'std::reference_wrapper‘
到
'std::reference_wrapper &&’之间
没有
已知
的
转换
:候选构造函数不可行:不知道
从
'std::reference_wrapper) _NOEXCEPT ^_NOEXCEPT)注:候选构造函数不可行:
没有
已知
的
从
'std::reference_wrapper‘
到
浏览 1
提问于2021-02-01
得票数 2
2
回答
派生模板类
的
unique_ptr列表
、
、
、
这将使我两者都能: }push_back(
const
value_type& __x) ^/usr/inclu
浏览 4
提问于2016-05-07
得票数 3
回答已采纳
1
回答
错误:调用“std::vector<std::__cxx11::basic_string<char>>::push_back(int&)”
没有
匹配函数
、
、
当我运行我
的
代码时,得到了以下错误: 大Sorting.cpp:在函数‘int(int,
const
**)’中:大Sorting.cpp:13:22:错误:
没有
匹配函数调用‘std::向量>::push_back:__cxx11::basic_string‘push_back(
const
value_type& __x) ^value_type&注意:
参数
1
从
’int‘
到
’
const
value_type&‘{aka’<
浏览 1
提问于2018-06-27
得票数 10
1
回答
如何改进我
的
自定义unique_ptr类?我想知道派生类可以
转换
为基类。
、
、
、
/src/callback_utils.h:11:3:注释:候选构造函数不可行:
对于
第一个
参数
unique_ptr,
没有
已知
的
从
'mcj::unique_ptr‘
到
'A’
的
转换
(CallbackT ptr= nullptr):ptr_(ptr) {^ /Users/chaojie.mo/Documents/test/src
浏览 3
提问于2022-03-11
得票数 0
回答已采纳
3
回答
Boost.Bind访问std::for_each中
的
std::map元素
、
、
、
、
我成功地使用std::for_each调用了
const
函数,
没有
任何问题,但是我在调用非
const
函数时遇到了一些问题。struct MyStruct {
void
someFunction();对
cons
浏览 6
提问于2010-02-22
得票数 8
回答已采纳
3
回答
使用enable_if根据模板类型隐藏成员函数
、
、
、
如果模板
参数
与特定类型匹配,我希望类模板提供额外
的
函数成员。我试图使用std::enable_if来实现SFINAE,但是我很难找到正确
的
语法。
对于
类似的问题,我已经尝试过几种解决方案,但由于某种原因,它们都
没有
编译。std::is_convertible< other_type,
value_type
>::value >::type >
void
function(
const
other_type& vals
浏览 3
提问于2021-11-15
得票数 1
2
回答
将此指针分配给指针
的
rvalue引用。
、
、
struct B;{}; {}; 在使用clang
的
上,它编译,但是
对于
gcc,我得到: 我还想指出MSVC也错了: 无法将
参数</
浏览 2
提问于2013-03-21
得票数 12
回答已采纳
3
回答
参数
1
从
“Image*”
到
“
const
Image&”
没有
已知
的
转换
、
我在调用设置
的
复制构造函数时遇到了一些困难。Image::Image(
const
Image& img) /* Copy constructor */ this->x = img.x; this->y = img.y;有什么办法能让我
的
论点相得益彰?
浏览 6
提问于2014-05-27
得票数 1
回答已采纳
1
回答
不允许将rvalue引用传递给函数
、
、
template <class Collection>
const
typename Collection::
value_type
::second_type&
const
typename Collection::
value_type
::first_type& key,
const
typename Collectio
浏览 3
提问于2015-02-26
得票数 10
回答已采纳
1
回答
调用“插入”
没有
匹配
的
成员函数
、
:type val) ~~~~~~~~~^~~~~~note: candidate function not viable: no known conversion fromargument<
浏览 2
提问于2016-02-17
得票数 1
回答已采纳
1
回答
错误:
没有
可行
的
从
'edge‘
到
'
const
value_type
’
的
转换
?
、
、
、
、
出现此错误
的
代码行是第42:21行,其中graph[u].push_back(edge(v, w));#include <vector> this->cost = cost; int getVertex()
const
{ } int getCost() <em
浏览 0
提问于2016-05-15
得票数 0
1
回答
模板比较迭代器
_Comparator &_cmp) : comp(_cmp) {
void
Add(int id,
const
_Type & needle); set<int> Search
const
_Tp&) _Tp = char _Tp注意:
参数
1
没有
已知
的
转换
,
从
‘
const
std::结对’
到
‘
const
char&a
浏览 3
提问于2013-05-05
得票数 1
1
回答
没有
已知
的
转换
我得到以下错误: multiset.cpp:47:1:注:候选人:my_multiset::iterator::iterator() my_multiset::iterator::itera
浏览 1
提问于2019-05-13
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
实时音视频
对象存储
活动推荐
运营活动
广告
关闭
领券