How to create your own streams
-
lets say that i have a function that ricieves input stream void get_data(istream & in){}
and i want to create a stream to read from
serial port and that stream calls one function "read_serial()" suppose read_serial() already defined
and another one to read only from one specific array array like int x[50]; -
Please, do use some punctuation. It's almost impossible to understand you right now.
You can communicate with serial ports using QtSerialPort module. It's built into Qt 5.1, and can be easily installed for earlier versions (Qt 4 > 4.7, all Qt5 releases to date).