将矩阵传递到函数的问题 [英] Issue with passing a matrix into a function

查看:100
本文介绍了将矩阵传递到函数的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能做什么...我需要传递矩阵到函数中?

what can I do... I need to pass a matrix into the function?

error C2664: 'WriteMatrixOut' : cannot convert parameter 1 from 'char [480][640]' to 'char ** '

指向的类型是不相关的;转换需要reinterpret_cast,C风格的转换或函数式转换

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

class Image 
{
public:
    char mm[480][640];
    void WriteMatrixOut(char **mm);
}


推荐答案

声明为 void WriteMatrixOut(char mm [480] [640]);

这篇关于将矩阵传递到函数的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆