View Single Post
djdas's Avatar
Posts: 77 | Thanked: 49 times | Joined on Apr 2010 @ Italy
#3
Well, I think opening a file in the window constructor and closing in the destructor could result in bad behavior. I would prefer to open, write and close all-in-one to maintain an "atomicity" for the operation.
But it's my opinion
Maybe you could use fflush() after writing (i.e. just after the fputc call) to flush the buffer and see the data written, but I don't know how it is implemented by the bluetooth protocol and if it works as expected.
Bye!
 

The Following User Says Thank You to djdas For This Useful Post: