
C语言中,错误显示的错误,请高手帮忙分析一下
C语言中,错误显示为:argumentoftype"char"isincompatiblewithparameteroftype"wv*"什么错误啊?...
C语言中,错误显示为:argument of type "char" is incompatible with parameter of type "wv*" 什么错误啊?
展开
展开全部
wv_pel* y = malloc(width * height * sizeof *y);
这句改一下啊
wv_pel * y = (wv_pel *)malloc(width * height * sizeof(wv_pel));
看有效果没?
你的sizeof()函数用错了,如此。。。
这句改一下啊
wv_pel * y = (wv_pel *)malloc(width * height * sizeof(wv_pel));
看有效果没?
你的sizeof()函数用错了,如此。。。
展开全部
参数类型“char”是不兼容的参数类型为
追问
我定义的是整形啊,下面是程序
height = 1 = 3 && ycbcr != 0)
{
wv_pel* y = malloc(width * height * sizeof *y);
。。
wv_rgb_to_ycbcr(width * height, channel_params[0].data, channel_params[1].data, channel_params[2].data, y, cb, cr);
free(channel_params[2].data); channel_params[2].data = cr;
。。
追答
不好意思水平有限看不懂你的写的代码
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
wv * 是什么呀,当然不是char型的啦
追问
我没有把“WV*”定义成char 类型的啊,有这样的函数
static wv_pel* raw_load(const char *fname, const int header, const int width, const int height)
{
FILE* in = fopen(fname, "rb");
wv_pel* out = NULL;
if (in)
{
int i, j, k, xpitch, ypitch;
unsigned char* tmp_row;
xpitch = 1 << log2i(width - 1);
ypitch = 1 << log2i(height - 1);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询