was not declared in this scope

问题遇到的现象和发生背景 敲c primer plus 代码的时候
问题相关代码,请勿粘贴截图

char get_choice(void)
{
int ch;
printf("Enter the letter of your choice:\n");
printf("a. advice b.bell\n");
printf("c.count q.quit\n");
ch = get_first();
while ((ch <'a' || ch > 'c' ) && ch != 'q');
{
printf("please respond with a, b, c, or q.\n");
ch = get_first();
}
return ch;
}
char get_first(void)
{
int ch;
ch = getchar();
while (getchar() != '\n')
continue;
return ch;
}

运行结果及报错内容 :第四行 error: `printf' was not declared in this scope

第七行 error: get_first' was not declared in this scope 第十八行 error: getchar' was not declared in this scope

我的解答思路和尝试过的方法

没有思路

get_first函数要写在get_choice函数前面,否则在get_choice函数中调用get_first函数时会找不到

提前申明函数,可以在程序头文件下面对最后一个函数声明,要么就把最后一个函数放在第一个函数前面