C++ (Qt)QFile f("/home/user/file.txt")if (!open(f,QIODevice::WriteOnly)) {qDebug() << "error open file"}