1

‘O_CREATE’ undeclared (first use in this function): Got this error

view story
linux-howto

http://ubuntuforums.org – Hi, While compiling the following code, I got an error: Code: #include<stdio.h> #include<fcntl.h> #include<sys/stat.h> #include<unistd.h> int copyfile(int from, int to) {     int bytes_read, bytes_written;     char *buff;     int a=100;         bytes_written=0;     bytes_read=0;     bytes_read=read(from,buff,a);     if(bytes_read<=0)     {printf("No bytes of data read from the input file");     }     printf("\n%d bytes (Hardware)