Hi,
how to convert it?
char buffer[1024];
fgets (buffer, sizeof(buffer), fp)
// convert buffer to c++ STL string
Hi,
how to convert it?
char buffer[1024];
fgets (buffer, sizeof(buffer), fp)
// convert buffer to c++ STL string
1st: you should use ifstream instead of fp;
2nd: you can convert like this:
str is which you need.Code:string str(buffer);
Hello, everyone.