[英]How to call a function in C
我試圖找出如何從main()調用給定的函數。
void initialize(struct word_pair word_table[], int size)
例如, initialize ( what, 5);
我是C的新手,我覺得這讓我頭腦中的一切都搞砸了。
這是一個示例用法:
#define SIZE 10
struct word_pair word_tables[SIZE];
// Populate the elements of word_tables
initialize(word_tables, SIZE);
initialize()
函數有兩個參數:
struct word_pair
的數組 在上面的示例中,變量word_tables
是一個大小為SIZE
的數組。
SIZE
是上面示例中定義為10
的macro
,但您可以根據需要進行更改。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.