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); 

error

thank's !

you're attempting pass stream value, streams cannot copied. pass reference instead:

void solo(std::ifstream& fichier); 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -