>but that will not be pure C++ programming....
Yes it will. If the C++ standard defines a construct, then it's "pure" C++. fgets and sscanf just don't conform to your idea of "pure" C++.
>it will be mixed thing(although no error).
And what's wrong with that? It seems to me that you're needlessly restricting yourself with this skewed concept of "pure" C++.
>in fact in this case i was expecting similar C++ function if exist
Pure C++ doesn't use archaic things like functions, it uses objects. If you want a one-liner, sscanf is there. Otherwise you're stuck with stringstreams:
int var1, var2;
//fgets(buff,100,ptr) // it is similar to getline() in C++
getline ( cin, buff );
//sscanf( buff,"%d %d",&var1,&var2) // what is similar in C++?
istringstream cppsscanf ( buff );
cppsscanf>> var1 >> var2;