C++ getline from File not working

I was assigned an assignment where we use c-string commands to manipulate the chars. That's not the problem though, my professor said that we wouldn't really need to use an array and that we would be able to use the get/pull to do it more efficiently. And that's where I'm lost and am looking for some help. I have to read a short paragraph from a file, which I know how to do, but then I'm not sure what to read it into if not an array.
Last edited on
Think I'm going to go ahead and go with the dynamic array anyways. But the problem I'm having below in the code fragment is it won't count the array for some reason.

1
2
3
4
5
6

while(!myFile.eof())
        {
        myFile.get();
        count++;
        }


Keep getting a compiler error saying struct std::ofstream has no member named get Not really sure why it's not working.
Last edited on
Topic archived. No new replies allowed.