Thread: Header files

  1. #1
    Registered User
    Join Date
    Aug 2009

    Header files

    hey soo this is from other code

    struct fd_set readFds;

    i think im missing a header file for this struct thats in linux and not very sure i thought it was.
    #include <sys/socket.h>
    #include <sys/types.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #include <sys/select.h>
    #include <unistd.h>
    #include <sys/time.h>

    but none of them define fd_set

    does anyone know which header file im missing

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Portland, OR
    There is no such thing as "struct fd_set", but there is an "fd_set" and it is in <sys/select.h> (i.e. remove the "struct")
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Toronto, ON
    According to this, it should be <sys/select.h>
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Header files and multiple definitions
    By sjweinberg in forum C++ Programming
    Replies: 16
    Last Post: 07-17-2009, 05:59 PM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. #include header files or .cpp files?
    By DoctorX in forum C++ Programming
    Replies: 3
    Last Post: 12-23-2006, 12:21 PM
  4. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM