I'm working in Eclipse on an assignment involving a server and clients communicating via sockets. I'm trying to use the accept system call, which uses the fd_set struct. The problem is Eclipse indicates that the type fd_set is unresolved.
Here is a list of my imports:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <vector>
#include <iostream>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
Why is Eclipse indicating fd_set is not recognized?
According to http://linux.die.net/man/3/fd_set, #include <sys/select.h>. Hopefully that will do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With