私は次のことを行う関数が欲しいです:
int doFunction(int* nIndex)
{
//nIndex is a 2-D array of any size.
// I would like to fill this array inside this function.
//Eg: in nIndex[2][3], i would like to put 5.
}
int result;
int myIndex[5][6];
result = doFunction(myIndex);
誰かが 2 つのことで私を助けてくれませんか: 1. 上記の構文は、任意のサイズの 2 次元配列を必要とする関数定義に対して正しいですか? 2. 関数に myIndex を渡すときの構文は大丈夫ですか? 3. 関数内の配列を埋める方法、またはそのフィールドにアクセスする方法を教えてください。
ありがとう。