Дополнен 1 неделю назад
сейчас мой код выглядит так:#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <limits>
using namespace std;
int main()
{
struct coal
{
string name;
string daysoftheweek;
double mining;
};
setlocale (LC_ALL, "RU");
string s;
int a;
ifstream input("C:\\Users\\User\\Desktop\\c++ projects\\input (utf-8).txt");
ofstream output("C:\\Users\\User\\Desktop\\c++ projects\\output (utf-8).txt");
getline(input, s);
output << s << setw(17) << "На сумму" << endl;
getline(input, s);
output << s << endl;
while (getline(input, s))
{
output << s << endl;
}
}
как можно считать только 5 нужных мне чисел из 3 и последующих строк?