I have a vector of strings. Need help figuring out how to convert it into vector of integers in order to be able to work with it arithmetically. Thanks!
#include
Here is the working version made up using the above comments.
#include
#include
#include
#include
using namespace std;
int main(int argc, char* argv[]) {
vector vectorOfStrings;
vectorOfStrings.push_back("1");
vectorOfStrings.push_back("2");
vectorOfStrings.push_back("3");
for (int i=0; i vectorOfIntegers;
int x;
for (int i=0; i> x;
vectorOfIntegers.push_back(x);
}
int sum = 0;
for (int i=0; i