Was hoping to print out the values of test1. I just would like to ask how come the values of test1 are not printed out and only prints out "PRINT START" and "PRINT END". Any help or idea is highly appreciate.
#include <vector>
#include <iostream>
using namespace std;
void print_out(vector<int> numbers)
{
cout << "------------- PRINT START -------------" << endl;
for( auto i: numbers )
cout << i << endl;
cout << "------------- PRINT END -------------" << endl;
}
vector<int> beautify(vector<string> numbers)
{
vector<int> result;
return result;
}
int main()
{
vector<string> test1;
test1.push_back("3167389213");
test1.push_back("32989741893");
test1.push_back("2138");
print_out(beautify(test1));
return 0;
}
Update
Thank you, So I've applied the codes inside beautify though it still cant output the test1 values.
vector<int> beautify(vector<string> numbers)
{
vector<int> result;
for (auto & i : numbers)
result.push_back(std::stoi(i));
return result;
}