Implementing Program Using String Stream