FILE *fp = fopen("result.txt", "w");


이런식으로 추가하고 나서

printf를

fprinf(fp, 소ㅑㄹ라);


이런식으로 바꾸던데


printf 가 아니라 cout<< 이런식으로 코딩되어 있으면


어떻게 해야 되나요?