Click here to Skip to main content
15,944,136 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a program with queues using linked lists. When i compile it, it has the following error:
expected ‘)’ before ‘*’ token >>in error_line
//queue struct
typedef struct{
    int embros,piso,adeia;
    int pinakas[PLITHOS];
int main(){ Q oura_apo; //define a new queue
dimiourgia(&oura_apo);//create the new queue
return 0; } //this function creates a new empty list
void dimiourgia(Q *oura){  //this is error_line

If you could just tell me what does the error mean?
Updated 1-Mar-11 6:45am
Sergey Alexandrovich Kryukov 1-Mar-11 13:01pm    
You did not show definition of "dimiourgia" and "PLITHOS" (OK, this one is integer constant), do you want to do some guesswork for you?
OriginalGriff 1-Mar-11 13:50pm    
Yes he does:
void dimiourgia(Q *oura){ //this is error_line
But I think he is missing the prototype...
Sergey Alexandrovich Kryukov 1-Mar-11 14:43pm    
Opps! I see, thank you (was reading from top).
OriginalGriff 1-Mar-11 15:04pm    
They never make it easy, do they? :laugh:
Sergey Alexandrovich Kryukov 1-Mar-11 15:26pm    
Not supposed to be easy :-)

1 solution

It compiles OK for me once I'd invented the stuff I assume you have above this: What do you have above this? What line is the compiler complaining about?

The error message should take you to the error line if double clicked.

A thought:

Have to got a prototype of dimiourgia defined above main?
If so, does it match the definition you have given here?
If not, put one between the definition of Q and the definition of main:
void dimiourgia(Q *oura);

That may cure your problem.
Share this answer
Sergey Alexandrovich Kryukov 1-Mar-11 14:44pm    
Sure, a 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900