如何将足够的数据从文本文件分配到char*中,然后将其复制到内存C 中

How to dynamically allocate enough data from text file into a char* and copy into memory C++

本文关键字:然后 内存 复制 char 文件分配 数据 文本      更新时间:2023-10-16
Text.txt 
Hi how 
are you 
Hey 
There
char* strings;

我如何动态分配足够的数据以适当并将其复制到内存中?

使用std :: string。它将为您处理分配。

相关文章: