0
각 파일의 첫 줄을 인쇄하려고하는데 주소를 출력하는 것 같아요.파일에서 줄 인쇄
#include <fstream>
#include <iostream>
#include <cstdlib>
using namespace std;
void FirstLineFromFile(ifstream files[], size_t count)
{
const int BUFSIZE = 511;
char buf[BUFSIZE];
ifstream *end, *start;
for (start = files, end = files + count; start < end; start++)
{
cout << start->getline(buf, sizeof(buf)) << '\n';
}
}
(시작 = 파일, 파일 끝에 = + 카운트 <시단; ++ 시작) (S * 시작) { \t의 getline 단계; \t cout << s << '\ n'; } – blitzeus