How can I define what I want to read from the file?

So how can I define what I want to get from a file?

I was hoping for something like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <fstream>
using namespaced std;
int main{

string input[];
fstream file;
file.open(PATH NAME)
int ctr=0;
while (1!=2)
{
if (input!="Word")
cin>> input[0]
}

return 0;
}
What is ctr? And won't 1!=2 always be true?

Also, cin is itself a stream. If you're reading in from a file, use the stream you created, called file.
Topic archived. No new replies allowed.