I'm having my head around for a couple of days with this question, and I still can't solve my problem.
If I need to read two strings from keyboard I can do this:
cin >> str1 >> str2;
However I want to filter the input.
What I'm trying to do, is something like this:
cin >> filter1 >> str1 >> filter2 >> str2;
or alternatively
cin >> filter1 >> filter2 >> str1 >> str2;
Where filter1 and filter2 are functions with regexes for filter the input.
My biggest trouble is I can't see how to insert the functions, between the input and the strings. .
Any help appreciated