Question:
i wanT to know what is wrong with this code?
shilpa s
2006-11-07 18:18:46 UTC
#include
#include
#define QUEUE_SIZE 5
struct queue
{
int f;
int r;
int a[10];
};
typedef struct queue QUEUE;
void insert_rear(int item,QUEUE *Q)
{
-----------
}

THE ERRORS ISSUED ARE
LINE 10:DECLARATION SYNTAX ERROR
LINE 11:) EXPECTED
Six answers:
n0body
2006-11-07 18:55:14 UTC
There are no syntax errors in the code snippet you provided.

Probably, there is something in process.h conflicting with your declarations. It is not a standard include file. If it comes with your compiler, try looking at it to see what the culprit is, or try changing your type names to see if it makes a difference. If you wrote that include file yourself, look into it for errors... It could be something subtle, like missing brace or a semicolon in the end, that confuses your compiler.
safrodin
2006-11-08 02:23:21 UTC
Line 10 is syntax Error



May be You can try use Different Name instead of QUEUE;



even it is Consider different between queue and QUEUE
justme
2006-11-08 14:08:32 UTC
the only thing I see is on the line:

void insert_rear(int item,QUEUE *Q)

the argument "QUEUE *Q" should be "queue *Q"
Erika
2006-11-08 02:22:00 UTC
whats it for cuse the prob. might be by line 10 it says syntax error
ALt
2006-11-08 02:26:09 UTC
check for typos and maybe its not a real code
2006-11-08 02:24:04 UTC
check your spelling


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...