Concerning #642, updating c++ examples to new style IO