aboutsummaryrefslogtreecommitdiff
path: root/week06/Exercise03.cpp
blob: f4f0229b41af9bac110cb41069c50db6bd3ed371 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <fstream>
#include <iostream>

int main() {
	char fileName[1024];
	std::cin.getline(fileName, 1024);

	std::ofstream file(fileName);
	if (!file.is_open()) {
		std::cout << "Couldn't open file!" << std::endl;
		return 1;
	}

	file << "Hello World!";
	file.close();
}