Copy a string: Difference between revisions
Content added Content deleted
m (→[[C plus plus|C++]]: std::string is part of the C++ standard library, but not of STL (although it's somewhat STL-compatible)) |
(→[[C plus plus|C++]]: #include <string>) |
||
Line 59: | Line 59: | ||
[[Category:C plus plus]] |
[[Category:C plus plus]] |
||
'''Libraries:''' C++ Standard Library |
'''Libraries:''' C++ Standard Library |
||
#include <string> |
|||
// STL |
|||
std::string src = "Hello"; |
std::string src = "Hello"; |
||
std::string dst = src; |
std::string dst = src; |