私は、メニューを扱うプログラムのために実行します。メインで関数を再宣言するのはなぜですか?
私は理解しなければならない主関数の前にすべての関数を宣言し、void関数である関数の1つも内部で言及しましたメイン:それはなぜ
char get_choice(void);
char get_first(void);
int get_int(void);
void count(void);
int main(void)
{
int choice;
void count(void);
while ((choice = get_choice()) != 'q')
{
switch (choice)
{
case 'a' : printf("Buy low, sell high.\n");
break;
case 'b' : putchar('\a'); /* ANSI */
break;
case 'c' : count();
break;
default : printf("Program error!\n");
break;
}
}
printf("Bye.\n");
...(関数の実装)
あなたは私を教えてくださいことはできますか? tnx
編集のための感謝@djechlin – MNY