Hello! I'm attempting to read the first letter of every line, and I'm not overly sure as to how I'd get to that point. I've been able to read the first letter of the first line, but I don't know how to go about getting to the next line and whatnot. If anyone could help me out, I'd really appreciate it! Thank you!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
#include <fstream>
usingnamespace std;
int main()
{
char output[1];
ifstream inFile;
inFile.open("Hello World.txt");
if (!inFile.is_open())
cout << "could not open";
inFile>>output;
cout << output;
return 0;
}