Hello, I have such a question, is it possible to pass the name of a text stream as an argument to a function:
#include <fstream> #include <iostream> using namespace std; int funk(string a, int size) { // Сюда в качестве аргументa добавить output // в теле функции результат вычислений записать в output } int main() { int i, j, s; string a; ifstream input("input.txt"); ofstream output("output.txt"); getline(input, a); s = a.length(); funk(a, s); } Please help, and sorry if the question is stupid.