Wednesday, January 29, 2020

CPP: Read file using ifstream



To build:
$: clang++ ifstream.cpp

Generate a file to read:
$: echo "hello world" > file.txt

Run it:
$: ./a.out

No comments:

CPP Quick Guide

Basics Hello world User input While loop If statement For loop Switch statement Read file using ifstream Write to a file using ofstr...