社区
C语言
帖子详情
cannot convert parameter 1 from 'int' to 'int [][10]'
Jeffrey123
2003-04-01 08:50:36
这是什么意思,该如何改?
...全文
171
5
打赏
收藏
cannot convert parameter 1 from 'int' to 'int [][10]'
这是什么意思,该如何改?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
lbaby
2003-04-01
打赏
举报
回复
函数有错
Jeffrey123
2003-04-01
打赏
举报
回复
是的
diabloqin
2003-04-01
打赏
举报
回复
p,q都是二维数组吗?
Jeffrey123
2003-04-01
打赏
举报
回复
int M(int a[10][10],int b[10][10])
{
……
return c[10][10];//a,b相乘赋给c,返回c数组
}
void main()
{
……
t[10][10]=m( p,q);//p,q为数组
}
在什么地方加?
fireinsky
2003-04-01
打赏
举报
回复
无法将int型的参数转换为数组(二维),在调用时,在参数前加一个&就行了
cannot
convert
parameter
1 from '
int
' to '
int
[]'
上述代码在编译时会出现 error C2664: 'InsertSort' : cannot
convert
parameter
1 from '
int
' to '
int
[]' 这是因为用数组名做函数实参时,向形参(数组名或指针变量)传递的是数组首元素地址,因此对参数的类型做一下改变,如下图所示:
error C2664: 'atof' : cannot
convert
parameter
1 from '
int
' to 'const char *'
double ff=atof(b); error C2664: 'atof' : cannot
convert
parameter
1 from '
int
' to 'const char *' 不能把
int
转换为字符型,因为vc中atof是把字符型转换成数值型。 atof(b)括号里面的b是整型数据。
程序报错 D:\vc++\数据换置.cpp(31) : error C2664: ‘f1‘ : cannot
convert
parameter
1 from ‘
int
‘ to ‘
int
*‘
程序报错 为什么
int
型转换不了啊
error C2664: 'strtol' : cannot
convert
parameter
1 from 'CString' to 'const char *'
text=strtol(m_recieve,NULL,16); 其中text为long型,m_recieve为CString型。 编译错误: error C2664: ‘strtol’ : cannot
convert
parameter
1 from ‘CString’ to ‘const char *’ 解决办法: 改成text=wcstol(m_recieve,NULL,16); 功能:转换...
cannot
convert
parameter
1 from 'const char *' to 'LPCWSTR
cannot
convert
parameter
1 from 'const char*' to 'LPCWSTR遇到这类字符串之间转换出问题的时候,一般都是编码使用的字符集的问题,到工程属性中设置字符集为Multi-Byte,不要使用Unicode即可。
C语言
69,373
社区成员
243,080
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章