C++ "infinite" length text [closed]
my task is to make a program that can store arbitrary long text in c++. I have no idea how to solve this. Also, you cannot use STL. someone please help
- allocate initial buffer (
malloc()
) - store data into buffer until full (
strcpy()
,strcat()
,memcpy()
...) - reallocate to a bigger buffer (
realloc()
) - goto 2
精彩评论