- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
#include <iostream>
#include <chrono>
#include <thread>
#include <fstream>
#include <string>
using namespace std;
float Cheking = 0;
void read_file()
{
string line;
ifstream file("text.bin");
if (file)
{
while (getline(file, line))
{
file >> Cheking;
}
file.close();
}
}
void write_file()
{
ofstream myfile("text.bin");
if (myfile.is_open())
{
myfile << "\n";
myfile << Cheking << "\n";
myfile.close();
}
else
{
cout << "Unable to open file";
myfile.close();
}
}
int main()
{
using namespace chrono;
using namespace this_thread;
setlocale(LC_ALL, "ukr");
read_file();
cout << "Число: " << Cheking << "\t\t";
cout << endl;
if (Cheking == 0)
{
cin >> Cheking;
}
write_file();
sleep_for(milliseconds(1000));
return 0;
}
MAKAKA 06.05.2020 12:51 # +2
гг;)
LinuxGovno 08.05.2020 00:13 # 0
Fike 06.05.2020 14:01 # 0
Вы хотели сказать «свежее и прогрессивное дополнение к застарелым методам IPC»
bormand 06.05.2020 14:08 # 0
jojaxon 06.05.2020 14:20 # +3
Fike 07.05.2020 00:44 # +2
ASD_77 07.05.2020 23:47 # 0
LinuxGovno 08.05.2020 00:18 # 0
ASD_77 08.05.2020 12:24 # 0
bormand 08.05.2020 12:36 # 0
Web_Monkey 08.05.2020 12:40 # 0
nemyx 08.05.2020 12:50 # 0
nemyx 08.05.2020 12:46 # 0
bormand 08.05.2020 13:09 # 0
nemyx 08.05.2020 13:54 # 0