textData.eof() return a true if the it has reached EOF (end of file), otherwise false. It does not make sense to compare that value to the value you got from tellg().
I don't really understand why you are using seekg in your code but generally the correct way to read from a stream is what Aramil of Elixia showed you. I think this page has a good explanation: http://www.parashift.com/c++-faq-lite/input-output.html