Hacker News new | past | comments | ask | show | jobs | submit login

"Dave" by itself is basically the same as in c++, just a pointer to a string literal. Dave.to_string() is like std::string {"Dave"}, it allocates a heap based string from said literal. So you can use "Dave" perfectly fine if you just want a string literal.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: