Have you included right headers? You need the following:
#include <fcntl.h> // for open
#include <unistd.h> // for close
do man open and man close on your terminal to find out what libraries they need for yourself
Have you included right headers? You need the following:
#include <fcntl.h> // for open
#include <unistd.h> // for close
do man open and man close on your terminal to find out what libraries they need for yourself