Skip to content
Advertisement

Tag: c++

sending input from file descriptor

I have a binary that I’m debugging remotely, one way for me to send input to that file is throw when I do the above the input is been received by the binary but I can’t simulate a keypress, and that causes me to switch to that binary and press enter every time. here is an example when you run

QT diconnect from wifi

I need to disconnect from current access point. I wrote this piece of code: How can I disconnect from wifi? Or should I use C/C++ (some API) for that? Answer You can use QProcess and run system commands to connect and disconnect WiFi like below but this is Linux solution: Replace wlp3s0 with your WiFi interface name. You can find

output in Line A and Line B?

What would be the output in Line A and Line B? Do you think there is synchronization problem in updating the variable value? Answer Child value is 200 and Parent value is 300 always. pthread_join causes the main thread to wait until the other thread finishes executing. Both threads are acting on the same global variable. So the thread_prog thread

Advertisement