I was working java and I used Scanner to access the content of text files, and also Printstream to write in new files, what would be the analogous way to perform these actions in c ++? for example, in java:
public Class(Scanner sc) {
while (!sc.hasNextInt()){
sc.nextLine();
........
public void write(PrintStream out) {
out.println("texto....");
......