Reading a C-String From A File

How would I read words from a text file and store them in as a C-String? I know how to do it if we were allowed to store it in as a C++ string however we are not allowed to use strings for this project.

See "Strings and null-terminated character sequences" on this page. The syntax whether using std::string or c-string is usually the same.
http://www.cplusplus.com/doc/tutorial/ntcs/


The main difference is getline() which comes in two flavours.

c-string:
http://www.cplusplus.com/reference/istream/istream/getline/


std::string:
http://www.cplusplus.com/reference/string/string/getline/
Topic archived. No new replies allowed.