Skip to content

Instantly share code, notes, and snippets.

@Adobe-Android
Created November 13, 2020 04:59
Show Gist options
  • Save Adobe-Android/703489a7cbab303e77296783c47c6747 to your computer and use it in GitHub Desktop.
Save Adobe-Android/703489a7cbab303e77296783c47c6747 to your computer and use it in GitHub Desktop.
Example of the useful std::to_string method in C++11
#include <iostream>
using std::cout;
using std::string;
int main() {
auto pi = "pi is " + std::to_string(3.14);
cout << pi << '\n';
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment