Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <ctime>
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <string>
- using namespace std;
- void FillFile(int number_size, const string& file_name) {
- string number = GetNSizeHexNumber(number_size);
- ofstream fout(file_name, std::ios::binary);
- fout << number;
- fout.close();
- }
- int main() {
- //cin cout
- ifstream fin("Finp.bin");
- if (!fin.is_open()) {
- cout << "failed to open " << SOURCE_FILE_NAME << '\n';
- return -1;
- }
- else {
- fin >> number;
- }
- fin.close();
- //запись числа в файл
- const string DESTINATION_FILE_NAME = "Fout.bin";
- //cout
- ofstream fout(DESTINATION_FILE_NAME);
- fout << n_in_o;
- fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement