undefined

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content
Previous: Strings - Part I Next: Input - Part I

Strings - Part II

#include <string>
using namespace std;
int main() {
int a = 123;
string s = to_string(a); // assign "123" to s
int i = stoi(s); // assign integer 123 to i
double d = stod(s); // assign floating point 123.0 to d
return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content