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

Discussion in 'C++' started by Balaji, Dec 3, 2004.

  1. Balaji

    Balaji Guest

    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
    Balaji, Dec 3, 2004
    #1
    1. Advertising

  2. Balaji

    Howard Guest

    "Balaji" <> wrote in message
    news:...
    > 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
    Howard, Dec 3, 2004
    #2
    1. Advertising

  3. Balaji

    Ron Natalie Guest

    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 (
    Ron Natalie, Dec 3, 2004
    #3
  4. Balaji

    Rade Guest

    "Balaji" <> wrote in message
    news:...
    > 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
    Rade, Dec 3, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert
    Replies:
    6
    Views:
    2,634
    Jim Michaels
    Feb 3, 2006
  2. John Kotuby
    Replies:
    1
    Views:
    383
    Lloyd Sheen
    Dec 12, 2007
  3. Replies:
    7
    Views:
    324
    James Kanze
    Mar 3, 2008
  4. Cal Who
    Replies:
    1
    Views:
    450
    Cal Who
    Jun 26, 2010
  5. DeltaX

    Error with complier !!

    DeltaX, Jun 12, 2005, in forum: Javascript
    Replies:
    1
    Views:
    99
    David Dorward
    Jun 12, 2005
Loading...

Share This Page