wohhie
9/6/2016 - 6:17 AM

Read From File

Read From File

#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main() {
	string line;

	ifstream myfile("wohhie.txt");
	if (myfile.is_open()) {
		
		while (getline(myfile, line)) {
			cout << line << endl;
		}

	}
	else {

		cout << "Unable to write.";
	}

	return 0;
}