Pregunta

I've added some methods to an existing project. It was writing correctly to a txt file. However i can only see my recently added std::cerr texts now, i execute my project like

./faceDemo > run.txt

What are the possible reasons?

¿Fue útil?

Solución

If you wish to redirect the error flow, you should use something like that :
./faceDemo > std.log 2> err.log

And if you wish to redirect both flows in the same file use this :
./faceDemo > run.txt 2>&1

2>&1 means redirect error flow into std flow

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top