Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个我想在末尾添加字符“#”的char* linefrom 。fgets (line , 255 , pFile)我如何在 C++ 中做到这一点?
char* line
fgets (line , 255 , pFile)
就像是
while ( fgets (line , 255 , pFile) != NULL ) { line = line + '#' }
strcat(line, "#");
当然正确的答案是std::string改用。
std::string