Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
メソッドを呼び出そうとすると、エラーが発生します。
int box(int rows, int cols, int [rows][cols])
この呼び出しを使用するメイン メソッドから:
box(arrayDimensions, arrayDimensions, array);
しかし、何が問題なのかわかりません。
ありがとう。
する必要があります
int box(int rows, int cols, int something[rows][cols])
関数定義/ヘッダーで使用するすべての変数には、識別子/名前が必要です。他のものと同様に、使用する配列には識別子/名前が必要です。これは、@AkshaiShah がコードをかなりうまく変更した変数であるためです。