M
merman
Hi,
The problem:
One function in my program reads line by line from a file (with fgets).
Then I chomp (like Perl) every newline at the end of line:
line[strlen(line)-1] = '\0';
The result is a "string" of variable length (it depends from file-size).
Is there a data-structure which dynamically grows for saving this
"string" of variable length? How can solve my problem?
Please keep the solution simple. I'm a newbie;-).
Thanks for help.
o-o
Thomas
The problem:
One function in my program reads line by line from a file (with fgets).
Then I chomp (like Perl) every newline at the end of line:
line[strlen(line)-1] = '\0';
The result is a "string" of variable length (it depends from file-size).
Is there a data-structure which dynamically grows for saving this
"string" of variable length? How can solve my problem?
Please keep the solution simple. I'm a newbie;-).
Thanks for help.
o-o
Thomas