Thursday, July 30, 2009

Getting input from a text file using c strings in c++?

How do i get input from a text file using c strings, not the standard string class. Is it possible?

Getting input from a text file using c strings in c++?
Sure, as long as you use the #include%26lt;fstream%26gt; header, and name the file you want to use as input. When you parse the data, just store it to a C-String, which as you should know is an array made exclusively of characters.


No comments:

Post a Comment