Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unix socket programming

Status
Not open for further replies.

rvy2k

Programmer
Jun 29, 2001
39
0
0
US
Hi everybody,

I am new to socket programming and C and i am trying to compile this:

/*code begins*/
struct sockaddr_in dest;
dest.sin_port = htons(MY_PORT);
/*code ends*/

However I am having a
%parse error before `='
compiling error.

Can anybody help?
Thanks!

 
Is it possible that the include files are missing for definition of the function htons. The reason might not be in this line.

A parse Error may have a lot of reasons. May be a missing ; or if there is anywhere a division by a Pointer variable written as a/*b instead a / *b or .............


hnd
hasso55@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top