我是C89的初学者,想要进行一些套接字编程:
void get(char *url) {
struct addrinfo *result;
char *hostname;
int error;
hostname = getHostname(url);
error = getaddrinfo(hostname, NULL, NULL, &result);
}
我正在Windows上开发。如果我使用以下的引用语句,Visual Studio会报错找不到该文件:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
我该怎么办?这是否意味着我不能在Linux上移植?