472,142 Members | 1,264 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

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

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
3 5404

"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
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
"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.

Similar topics

3 posts views Thread by Nathan Sokalski | last post: by
3 posts views Thread by mandogon | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.