fortunely2: data 是会确保有null终结符的,可以看看这里 /reference/string/string/data/ [code=cpp] Returns a pointer to an array that contains a null-terminated sequence of characters (., a C-string) representing the current value of the string object. This array includes the same sequence of characters that make up the value of the string object plus an additional terminating null-character ('\0') at the end. The pointer returned points to the internal array currently used by the string object to store the characters that conform its value. Both string::data and string::c_str are synonyms and return the same value. [/code]
epoll_create和epoll_create1踩坑,导致cpu100%
string.c_str() 和 () 的区别