[C] fwrite 예제
fwrite를 이용한 파일에 내용 써넣기 예제.. #include #include #include "common.h" void setValue(char *buf) { char tempBuf[64]; memset(tempBuf, 0x00, sizeof(char) * 64); int a = 0; sprintf(tempBuf, "test %d\n", a); strcat(buf, tempBuf); sprintf(tempBuf, "test2 %d\n", a+1); strcat(buf, tempBuf); sprintf(tempBuf, "\n%d\t%d\n%d\t%d\n\n", a+1, a+2, a+3, a+4); strcat(buf, tempBuf); sprintf(tempBuf, "test3 %2d\n", a+5..
2009. 5. 27.