Probably a really simple problem but I don't get it.
I'm trying to print the value of TUNSETIFF
from linux/if_tun.h
#include <linux/if_tun.h>
#include <stdio.h>
int main()
{
printf("%d", TUNSETIFF);
return 0;
}
When I try to compile this code I get an error:
In file included from test.c:1:0:
test.c: In function `main`:
test.c:7:24: error: expected expression before `int`
printf("%d", TUNSETIFF);
^
I don't understand what is wrong with my code, isn't that how you print an integer? If I just do printf("Hello")
it works just fine..