Hello, im begginer and I have problem with converting string to two int separated by white space. I must enter two binary numbers in one string and make sum of them and print them again as bin number but when i convert string to int i have problem with second number.
#include <sstream>
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
string cisla;
string cislaII;
int a, b;
cout << "enter two bin numbers" << endl;
cin >> cisla;
getline(cin, cislaII);
istringstream is(cisla);
is >> a;
cout << "number a is " << a << endl;
istringstream ii(cislaII);
is >> b;
cout << "number b is " << b << endl;
return 0;
}