C++ ifstream to function -
(french, sorry 4 bad english) hi guys, have error when want send ifstream function.
function.cpp:
void solo(ifstream fichier) { fichier("dico.txt"); }
function.h
void solo(std::ifstream fichier);
thank's !
you're attempting pass stream value, streams cannot copied. pass reference instead:
void solo(std::ifstream& fichier);
Comments
Post a Comment