请教两道题目,谢谢
1Write a program which reads lines from a text file into a dynamically allocated array
where also the length of the line is allocated dynamically.
Hint: Read line first into a temporary variable and compute length of the line.
2
Write a program which reads lines from a text file into a dynamically allocated array.
Program may use a static limit for line length.
Hint: First open the file then read (and discard) all lines to count
how many lines there are in the file. Then reopen the file to really read the data.