我在实际获取函数对不同变量执行操作时遇到了问题。我不知道是不是因为我错误地定义了它,而是希望得到帮助。C函数调用问题
#include <stdio.h>
int dmv(int x);
int main()
{
printf("Welcome to DMV simulator 2014! \n");
printf("Come forward first client");
int z;
int d;
int f;
int g;
int h;
int j;
int e;
int q;
int s;
dmv(int z);
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
int option;
if(option == "yes")
{
dmv(int f);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int d);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int g);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int h);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int j);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int e);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int q);
}
else
{
printf("We're closing");
}
printf("Are there anymore people?");
printf("If 'yes' say so otherwise say 'no'");
if(option == "yes")
{
dmv(int s);
}
else
{
printf("We're closing");
}
printf("Alright we're closing!");
return(0);
}
int dmv(int x)
{
pritnf("Enter your name \n");
char name;
char Birthday;
printf("Enter your DOB");
scanf("%c" , name);
scanf("%c" , Birthday);
printf("Here is your lisence %d" , name);
}
这里是我在cygwin得到的错误。
Functionography.c:19: error: parse error before "int"
Functionography.c:23: warning: comparison between pointer and integer
Functionography.c:25: error: parse error before "int"
Functionography.c:34: warning: comparison between pointer and integer
Functionography.c:36: error: parse error before "int"
Functionography.c:45: warning: comparison between pointer and integer
Functionography.c:47: error: parse error before "int"
Functionography.c:56: warning: comparison between pointer and integer
Functionography.c:58: error: parse error before "int"
Functionography.c:67: warning: comparison between pointer and integer
Functionography.c:69: error: parse error before "int"
Functionography.c:77: warning: comparison between pointer and integer
Functionography.c:79: error: parse error before "int"
Functionography.c:88: warning: comparison between pointer and integer
Functionography.c:90: error: parse error before "int"
Functionography.c:99: warning: comparison between pointer and integer
Functionography.c:101: error: parse error before "int"
什么是线19的目的是什么? –
你应该尝试一个叫做* loops *的新概念。 –
这里有很多问题,包括一些非常基本的语法问题。 – crashmstr