#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
#include <fstream>
int b = 0;
ifstream pl("09052021.txt");
if (pl.is_open()) {
char c;
while (pl.get(c)) {
if (c == '1') {
b++;
}
}
}
else {
cout << "wtf";
}
cout << b;
}
Is it possible to read date in c++ from a file at certain point? eg. I want to read 7th letter of the file. here i go through the whole file while i want to read just a part of it.