#include <fstream>
#include <iostream>
#include <string>
std::ifstream inputfile;
string file = "test.txt";
string buffer;
inputfile.open(file, std::ios::in);
std::getline(inputfile, buffer);
--------------------------------------------------
// 複数行の場合
while(std::getline(inputfile, buffer)){
std::cout << buffer << std::endl;
}