Архив метки: Работа с файлами

Урок 9. Работа с файлами в с++

Видео для урока. Код урока. // ConsoleApplication3.cpp : Defines the entry point for the console application. // #include «stdafx.h» #include <iostream> #include <fstream> using namespace std; int main() { ofstream myfile; myfile.open(«login.txt»); myfile << «admin»; myfile.close(); myfile.open(«password.txt»); myfile << «123»; myfile.close(); ifstream file(«password.txt»); char *pass1; pass1 = new char[100]; char *login1; login1 = new char[100];… Читать далее »