C question

This is a discussion on C question within the Networking/Device Communication forums, part of the General Programming Boards category; #include <sys/socket.h> #include <resolv.h> #include <arpa/inet.h. #include <netinet/in.h> #include <stdio.h> If i am right the headers i type out i ...

  1. #1
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28

    C question

    #include <sys/socket.h>
    #include <resolv.h>
    #include <arpa/inet.h.
    #include <netinet/in.h>
    #include <stdio.h>

    If i am right the headers i type out i could connect to a server remote over the internet am i missing any other headers?

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    Good title for the thread, who would have guessed you'd have a C question.

    Does connecting to another machine not work? If so why don't you just tell us the error instead of having us fumble around with could-be answers. Try reading beej's tutorial too if you havn't already.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    It probably depends on your compiler . . . . Try posting in the networking board or get a tutorial.

    Do you get link errors or something?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28
    I useing Gcc and linux as my os.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    As stated, go read Beej's guide. It'll get you started well enough along.


    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28
    The Beej's guide link is not working i try that.

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    491

  8. #8
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28
    That odd still don't work.

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    491

  10. #10
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28
    Thanks it work now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 12:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21