#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
char data [ 6 ];
main ( ) {
int len;
desc = open ( "Resultat", O_WRONLY | O_CREAT | O_EXCL, 0666 );
if ( desc != -1 ) {
len = write ( desc, &data, sizeof ( data ) );
if ( len != sizeof ( data ) )
printf ( "ERROR" );
} }
这是我的代码,我收到了错误
O_WRONLY undeclared (first use in this function)
O_CREAT undeclared (first use in this function)
O_EXCL undeclared (first use in this function)
我该如何解决?