int main()
{
string word="";
ofstream a(file);
a << "This is the first line." << endl;
a << "This is the second line." << endl;
a << "This is the third line." << endl;
a << "This is the fourth line." << endl;
a.close();

How do you read the file line by line?
How do you go to a specific line in the text file and read it?(like go to line 4 and read the text there)
Is there anything I could put besides NULL in the first parameter of seekg?

>How do you go to a specific line in the text file and read it?(like
>go to line 4 and read the text there)
By starting at the beginning and reading three lines. Text files aren't very forgiving in how you can move through them.

>Is there anything I could put besides NULL in the first parameter of seekg?
Yes, you can use any offset from 0 to the size of the file if you are in binary mode, otherwise yes, but you can't be guaranteed that it will work. Chances are that it will not.