online search (vs. offline processing) using iostream