How do I read long lines from a text file in C++?

前端 未结 3 1750
轻奢々
轻奢々 2020-12-19 05:12

I am using the following code for reading lines from a text-file. What is the best method for handling the case where the line is greater than the limit SIZE_MAX_LINE?

3条回答
  •  忘掉有多难
    2020-12-19 06:01

    If you use the free function in string, you don't have to pass a max length. It also the uses C++ string type.

提交回复
热议问题