LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-14-2009, 12:36 PM   #1
hellgirl
LQ Newbie
 
Registered: Sep 2009
Location: tulsa, ok
Distribution: n/o
Posts: 5

Rep: Reputation: 0
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
 
Old 09-14-2009, 12:50 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
This is probably the cause of the message
Code:
int main()
{
return 0;
) <<--
PS
Please embed code between [code] and [/code] to preserve formatting.

Last edited by Wim Sturkenboom; 09-14-2009 at 12:52 PM.
 
Old 09-14-2009, 01:02 PM   #3
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
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 }
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[python] syntax Error : invalid syntax Python_user Programming 2 09-06-2009 12:52 PM
Can anyone explain what program language uses this syntax? pr&int martinwprior Programming 3 05-07-2008 03:44 AM
invalid types ‘int[int]’ for array subscript medha Programming 16 08-25-2006 08:30 AM
C++ syntax error before :: token HELP, i cant find the syntax error :( qwijibow Programming 2 12-14-2004 06:09 PM
invalid types int[int] for array subscript scuzzman Programming 2 11-16-2004 09:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration