I’m trying to insert multiple inputs on one line, with comma and a space between the inputs. The method I’ve been using so far separates inputs with spaces.
int a, b , c ,d
cin >> a >> b >> c >> d ;
With this method , the input line looks like this :
1 2 3 4
But I want to be able to input data like this:
1, 2, 3, 4
The delimiter character for
>>isn’t modifiable, but you can use it in combination withignore: