Hello,
First of all: please pardon my inexperience. I'm new to Unix/Linux. My apologies upfront
I'm trying to use the inet_pton() function. I've created the below script based on what I found in the manual (man inet_pton):
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
inet_pton(AF_INET6, "2001:0610:1A00::", test);
printf("%s",test);
I named it btest.script and then ran chmod 777 to make it executable. When I execute it using ./btest.script I get the error:
syntax error near unexpected token `AF_INET6,'
To me this says that it just doesn't recognize the inet_pton() function and that I should call some shell or programme before trying to use it. But I know my logic is flawed here, I'm probably missing a huge basic step, but if someone could please take a minute to explain what's going on, I would greatly appreciate it.
Thanx!