/
Krahjotdaan
/
ArrayModule-for-cpp
Обзор
Документация
Войти
/
Krahjotdaan
/
ArrayModule-for-cpp
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
implementation_files/file_output.cpp
101 строка
3 KB
Ostapenko
Docs: added Doxygen comments to implementation files
06 июн 2023, 14:36
06 июн 2023, 14:36
2def49f
Код
Авторство
О чём код?
#include "../arraymodule.hpp" #include <iostream> #include <fstream> using namespace std; /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(int array[], int size, ofstream&) { ofstream file("output.txt"); for (int i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(long long array[], int size, ofstream&) { ofstream file("output.txt"); for (int i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(float array[], int size, ofstream&) { ofstream file("output.txt"); for (int i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(double array[], int size, ofstream&) { ofstream file("output.txt"); for (int i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(int array[], long long size, ofstream&) { ofstream file("output.txt"); for (long long i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(long long array[], long long size, ofstream&) { ofstream file("output.txt"); for (long long i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(float array[], long long size, ofstream&) { ofstream file("output.txt"); for (long long i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; } /// @brief writing array to file /// @param array source array /// @param size size of array /// @param ofstream object of class ofstream void print(double array[], long long size, ofstream&) { ofstream file("output.txt"); for (long long i = 0; i < size; i++) { file << array[i] << " "; } file << "\n"; }