I want to input two variables like a/b.One book suggest this as
Can anyone explain why above code gives the desired result.Also is there any other way out.In C we used to do it asCode:int a,b; char dummychar; cin>>a>>dummychar>>b;
Also please give me a link to other aspect of formatted input in C++.Code:scanf("%d/%d",&a,&b);