struct client
{
char Fname[20];
char Lname[20];
char home_num[10];
char cell_num[10];
char email_add[20];
int client_id;
}; /* ending the client struct*/
char Main_Menu()
{
char sel;
int rear=-1;
int front=-1;
client clientQueue [size]; -->I keep having an error come up right here, not sure why.
int isFull(int rear);
int isEmpty(int rear);
我收到错误的地方是我声明队列的行。 不太确定为什么我会收到该错误,因为当我研究时,我发现了这一点。 p.s尺寸为20
最佳答案
如果这是纯C
,则必须使用struct
-关键字
struct client clientQueue [size];
并且size
也必须在某个地方定义。
或者使用typedef
,例如
typedef struct client {
char Fname[20];
char Lname[20];
char home_num[10];
char cell_num[10];
char email_add[20];
int client_id;
} client;
关于c - 在C中实现队列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15819352/