Hi,
I'm having some problems trying to change a string into an integer. I've looked up some examples, but can't seem to find the problem.
Here's my code:
Code:#include <stdio.h> #include<iostream> #include<iomanip> #include<sstream> #include<fstream> #include<string> #include<cctype> using std:: cout; using std:: cin; using std:: endl; using namespace std; void conversion(string& text); int main() { string textX = "234"; conversion(textX); return 0; } void conversion(string& text) { int number; number = atoi(text); }