从MFC函数返回2D数组 [英] return 2D array from MFC function
本文介绍了从MFC函数返回2D数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个有功能的课.
我的要求是功能应返回2D数组.但是当我尝试此操作时,将返回数组.
I have class in which there is function.
my requirement is fucntion should return 2D array.But when i try this gives me array.
推荐答案
您可以返回数组的起始地址.对于2D,它将是指向指针的指针.
示例a [] []等效于** a.
You can return the start address for the array. For 2D it will be pointer to pointer.
Example a[][] is equivalent to **a.
假设int nArr [] []是2d数组,然后尝试使用此
返回nArr;
:)
Suppose int nArr[][] is 2d array then try this
return nArr;
:)
这篇关于从MFC函数返回2D数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文