摘要: int data = 0b11111111'00000000'00000000'00000001; //int data=-16777215 //等效 char cBuff[4]; *(short*)cBuff = 1; cBuff[2] = 0; cBuff[3] = 255; 二进制字面量dat 阅读全文
posted @ 2025-03-17 13:42 夕西行 阅读(30) 评论(0) 推荐(0)
摘要: host不能被使用,因为被释放了。ip.toStdString()返回的临时对象被释放。 QString ip = ui->lineEdit_IP->text(); const char* host = ip.toStdString().c_str(); //此行结束,临时对象被释放 建议在需要ho 阅读全文
posted @ 2025-03-17 11:27 夕西行 阅读(13) 评论(0) 推荐(0)