ÃßõµÇ¾ú½À´Ï´Ù.
|
´ÜÃà URL: https://humoruniv.com/program6641 URL º¹»ç |
#include <iostream>
#include <cstring>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
using namespace std;
int fd;
int fw;
int main(int argc, char *argv[]){
fd = open("in1.txt", O_CREAT | O_TRUNC | O_RDWR, 0644);
if(fd == -1 ){
cout << "error";}
fw = open("out1.txt", O_CREAT | O_TRUNC | O_WRONLY,0644);
if(fw == -1){
cout << "error_2";}
char a[20] = "1234";
write(fd,a,sizeof(a));
close(fd);
close(fw);
return 0;
}
|
¡ã ´ÙÀ½±Û | ¸®´ª½º ¼û±èÆÄÀÏ | ¹Ö°í¹Ö°í |
![]() ![]() ![]() ![]() |
2018-11-12 [11:16] |
¡å ÀÌÀü±Û | ¸®´ª½º¿¡¼ ÆÄÀÏÀÔÃâ·Â | ³¬½Ã¿Õ±èŰø |
![]() ![]() ![]() ![]() |
2018-11-11 [16:47] |
¡ã ´ÙÀ½±Û | ¸®´ª½º ¼û±èÆÄÀÏ | ¹Ö°í¹Ö°í |
![]() ![]() ![]() ![]() |
2018-11-12 [11:16] |
¡å ÀÌÀü±Û | ¸®´ª½º¿¡¼ ÆÄÀÏÀÔÃâ·Â | ³¬½Ã¿Õ±èŰø |
![]() ![]() ![]() ![]() |
2018-11-11 [16:47] |