#include <stdio.h>
#include <stdlib.h>
void load_menu(void)
void Printing(void)
int main(int argc, char** argv)
{
load_menu();
return 0;
}
void load_menu(void)
{
int choice;
do
{
printf("Menu\n\n");
printf("\t1.Printing \n");
printf("\t2. Exit \n");
scanf_s("%d", &choice);
switch (choice)
{
case 1: printing();
break;
case 2: printf("Exiting. \n");
system("PAUSE");
exit(0);
}
} while (choice != 2);
}
void printing(void)
{
printf(". \n");
return;
}
我还没有完全完成这个程序,但是如果我编译它,我会得到:
Error 1 error C2085: 'Print' : not in formal parameter list
Error 2 error C2143: syntax error : missing ';' before 'type'
Error 3 error C2085: 'main' : not in formal parameter list
Error 4 error C2143: syntax error : missing ';' before '{'
Warning 5 warning C4098: 'load_menu' : 'void' function returning a value
Error 6 error C2084: function 'void load_menu(void)' already has a body
Warning 7 warning C4013: 'printing' undefined; assuming extern returning int
Error 8 error C2371: 'printing' : redefinition; different basic types
我在这里做什么?打扰一下。大约几周前,我开始用 C 编程。