I am using write command from C++ file. i have a terminalid to write to.

Something like:-

write(terminalid, buffer, bytes);

Now, i want to display it on the terminal,how to do that?
I thought of using echo command from C++ file, but how to do it?