I have a qns. How can i take out the number in a basic string input and assign them into different integer variable? Not a file input
example - string input = "23/4/56" or "23.4.56"
int a = 23, b=4, c = 56
#include <iostream>
#include <string>
using namespace std;
string digit1, digit2,
int main()
{
string value;
cout <<"Please input something: ";
cin >> value;
for(int i=0; i<value.size(); i++)
if(value[size] != '/' ||value[size] != '.')
if (isdigit(value[size])))
digit1 +=value[size];
else
??
cout << endl;
return 0;
}