0

I am reading a text file from an input file. The problem is that when I cout the text to the screen not all of the original text file is showing. The text file is large, but I was wondering if there was any way I could possibly display all of it. Thanks!

5
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by Jishnu
0

I am reading a text file from an input file. The problem is that when I cout the text to the screen not all of the original text file is showing. The text file is large, but I was wondering if there was any way I could possibly display all of it. Thanks!

It would be nice if you post your code here. Make sure you post it with code tag.

0

Use fread function, search the cplusplus site for more information, it think it's a part of cstdlib

0

The text file is large, but I was wondering if there was any way I could possibly display all of it.

The console screen consists of 80*25 characters. If your file size is greater than that, then you cannot display entire file at a time. What you can do is, display a part of it (say, x characters) and ask the user to enter some character after which you can display the next x characters in the file.

Hope this helped.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.