LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   syntax error before int (https://www.linuxquestions.org/questions/programming-9/syntax-error-before-int-755127/)

hellgirl 09-14-2009 12:36 PM

syntax error before int
 
#include <errno.h>

extern int errno

#define MaxBuffV 1024


/* The Named Pipe Linkages...*/


#define FIFO1
#define FIFO2

int Client(int rfd, int wfd); /* line in question with error */


int main()
{
return 0;
)

int Client(int rfd, int wfd)
{
return 0l;
}

when I compile program in gcc compiler
I get a message saying at top level above main


error: syntax error before "int"




why is it doing this

Wim Sturkenboom 09-14-2009 12:50 PM

This is probably the cause of the message
Code:

int main()
{
return 0;
) <<--

PS
Please embed code between [code] and [/code] to preserve formatting.

orgcandman 09-14-2009 01:02 PM

There are a few problems.

Code:

extern int errno
shouldn't be needed if you're already #include'ing errno.h
Even if it is, you need a semicolon at the end.

Code:


int main()
{
return 0;
)

The ) should be }


All times are GMT -5. The time now is 05:27 PM.