FILE* fp = fopen("output.txt", "rw"); fprintf(fp, "hello");
이렇게하면 output.txt 에 아무것도 쓰기가 안되더군요 --? w 로 주면 되는데 rw 로 옵션을 주면 안되더군요 rw면 read write 다되야하는거 아닌가요? 뭔가 다른실수인가..;
man fopen
read write 를 위해서는 "r+" 또는 "w+", "a+"를 하셔야... ^^;
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
man fopen read write 를 위해서는
man fopen
read write 를 위해서는 "r+" 또는 "w+", "a+"를 하셔야... ^^;
댓글 달기