Hi,
i have five{number is unimportant} independent objects{the purpose is to model sensors} and i want them to write sequentially{not in the same time}, some info to a file{all to the same file} and at screen...
i was thinking to implement a fileWriter class, that will create the file...and then pass a reference {of an object of fileWriter class} to each of the five objects-sensors, so they can write to the same file.
The problem is that i dont know if this is the best way to do this{object oriented speaking} and if this is the way how can i implement this system similar to cout?
In particular someone can use cout anywhere in his program{if he includes iostream} and always the output is the same{stdout}....
Last question::does anyone have a good link for input-output in c++?
thanks for your time,
N.A