mirror of
https://github.com/DevEhChad/cpp-cheatsheet.git
synced 2025-11-08 14:01:34 +00:00
Add std::to_string
This commit is contained in:
committed by
GitHub
parent
7e38a9247d
commit
a982c7eaa8
@@ -352,6 +352,7 @@ s1 == "hello world" // Comparison, also <, >, !=, etc.
|
|||||||
s1[0]; // 'h'
|
s1[0]; // 'h'
|
||||||
s1.substr(m, n); // Substring of size n starting at s1[m]
|
s1.substr(m, n); // Substring of size n starting at s1[m]
|
||||||
s1.c_str(); // Convert to const char*
|
s1.c_str(); // Convert to const char*
|
||||||
|
s1 = to_string(12.05); // Converts number to string
|
||||||
getline(cin, s); // Read line ending in '\n'
|
getline(cin, s); // Read line ending in '\n'
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user