Last active
May 8, 2016 09:02
-
-
Save danspndl/e4ebc3d410b93615426c1d209bfc2102 to your computer and use it in GitHub Desktop.
Convert string to int - C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdlib.h> // atoi | |
using namespace std; | |
int main(){ | |
int intVar = 0; | |
string stringVar = ""; | |
stringVar = atoi(intVar.c_str()); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment