0
構造体の配列を関数にどのように送ることができるか知りたい。それが機能して送信し、関数呼び出しを使用してすべての値を印刷することができますどのようにCの関数として渡された構造体の配列
typedef struct {
char fname[20];
char lname[20];
int cnumber[12];
} contact;
contact record[40];
int main()
{
// I have all the data in the record array as I am reading it from the
// file and want to pass the record array to the function PRINT and access it.
print();
}
?
また、配列の長さを渡す必要があります。 – army007
アイテムのサイズ(サイズではない)の 'size_t'はなぜですか? –
@JohnColemanあなたが何を意味するか分からない。これを 'size_t'の代わりに' int'にするのが好きですか? – RoadRunner