By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 916 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Complier error!! error C2059: syntax error : '('

P: n/a
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(char * addr,int port)

Hers is the error I'm getting..

error C2059: syntax error : '('

Any help is appreciated..

Balaji
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Balaji" <ba****@email.arizona.edu> wrote in message
news:49**************************@posting.google.c om...
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(char * addr,int port)

Hers is the error I'm getting..

error C2059: syntax error : '('

Any help is appreciated..

Balaji


Well, it would be hard for me to know what's wrong without knowing what FAR,
PASCAL and __declspec are. I'd guess they're macros, but what they expand
to is unkown. This appears to be Windows stuff (and possibly OLD windows
stuff, given the FAR specifier), so you might ask in a windows newsgroup.
(Also, shouldn't there be a semi-colon at the end of that line?)

-Howard
Jul 22 '05 #2

P: n/a
Balaji wrote:
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(char * addr,int port)

There's no name for the function here. Should be a function
name between the first ) and the following (
Jul 22 '05 #3

P: n/a
"Balaji" <ba****@email.arizona.edu> wrote in message
news:49**************************@posting.google.c om...
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(char * addr,int port)

Hers is the error I'm getting..

error C2059: syntax error : '('

Any help is appreciated..

Balaji


Is this a function declaration? If yes, where is the name of the function ?

Rade
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.