Bug
Bug
weifc-wei
遇到问题,解决问题。咯卡咯伽!!!
展开
-
从Qt4.x 过渡到 Qt5 error: no matching function for call to ‘QDrag::QDrag(QWidget*)‘
error: no matching function for call to ‘QDrag::QDrag(QWidget*)’参考: 点击我QDrag ProblemsApps that have drop and drag functionality will need some tweaking. A line such asQDrag *drag = new QDrag(event->widget());in Qt 5 will generate the errorerro翻译 2021-04-19 21:41:10 · 319 阅读 · 0 评论 -
error: variable ‘XXXX’ set but not used [-Werror=unused-but-set-variable]
error: variable ‘XXXX’ set but not used [-Werror=unused-but-set-variable]编译的时候出现这个错误error: variable ‘XXXX’ set but not used [-Werror=unused-but-set-variable]2、解决办法找到相应的Makefile文件LOCAL_CFLAGS += -Wall -Werror去掉上面的 -Werror,改成如下LOCAL_CFLAGS += -Wall原创 2020-10-05 10:48:11 · 13865 阅读 · 1 评论 -
对YAML :: LoadFile的未定义引用
对YAML :: LoadFile的未定义引用起语:版权声明:原文:http://www.sylar.top/blog/?p=103YAML 介绍YAML是一种结构化的文档结构,类似于json,xml。相比于json,xml.yaml更适合做配置使用yaml-cpp是常用的yaml库YAML-CPP 环境安装1. 下载源代码git clone https://github.com/jbeder/yaml-cpp.git2. 编译安装mkdir buildcd buildc翻译 2020-09-28 23:39:51 · 3414 阅读 · 0 评论 -
feof() 巨坑有兴趣了解一下!!!
一、feof()是什么?feof()是检测流上的文件结束符的函数,如果文件结束,则返回非0值,否则返回0一般在文件操作,中经常使用feof()判断文件是否结束。二、feof()的经典错误#include<stdio.h>int main(void){ FILE *p; p = fopen("open.txt", "r"); if (feof(p)) { printf("文件为空。"); } else {原创 2020-09-21 00:28:52 · 1422 阅读 · 1 评论 -
error: implicit declaration of function ‘fileno’
error: implicit declaration of function ‘fileno’编译的时候,使用选项 -std=gnu99 ,而不要使用 -std=c99 或者其他的。编译参数, 会影响编译!!!原创 2020-09-20 10:45:57 · 358 阅读 · 0 评论 -
error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘__off_t’
error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘__off_t’ [-Werror=format=]printf(“length of the file is : %d\n”, buf.st_size);具体代码#include <stdio.h>#include <sys/mman.h>#include <fcntl.h>#include <errn原创 2020-09-19 20:30:30 · 7014 阅读 · 0 评论 -
Linux服务器 - 文件操作 | 突然宕机的解决之道
起语:版权声明: 腾讯课堂->奇牛学院.我只是用来方便学习 && 复习!!! 我只是一个学习者, 从来不对我说过的话负责, 大家看到谨慎参考!!!解决之道#define _GNU_SOURCE#include <stdio.h>#include <string.h>#include <stdlib.h>#include <errno.h>#include <unistd.h>#include <s翻译 2020-08-20 16:11:54 · 380 阅读 · 0 评论 -
什么 - Windows平台下安装与配置MySQL - 失败!!!
什么 - Windows平台下安装与配置MySQL - 失败!!!首先检查电脑的配置设置 | 关于 |如果是个 人版\家庭版(会没有问题)双击红色的部分原本是没有的(要自己添加的)点击 | 添加点击 | 检查名称点击 | 确定你会发现多了这个东西 (这个是提高网络权限的) 如果没有 MySQL 会启动失败确定 -> 应用最后重启电脑 OK结语:时间: 2020-07-04...翻译 2020-07-04 21:34:35 · 107 阅读 · 0 评论 -
static -常见的错误 -
static -常见的错误正确的demo1#include <iostream>using namespace std;class Man{public: Man() { count++; } void play() const { cout<<"I am playing ..."<<endl; } static int getCount() { return count; }private: static int翻译 2020-06-21 14:36:00 · 649 阅读 · 0 评论 -
const - 常见错误
const - 常见错误(一)报错:error C2662: “Man::play”: 不能将“this”指针从“const Man”转换为“Man &”#include <iostream>using namespace std;class Man{public: Man() { } void play() { cout<<"I am playing ..."<<endl; }};int main(void){ c翻译 2020-06-21 11:42:30 · 942 阅读 · 0 评论 -
vector的陷阱-最常见的错误-
vector的陷阱#include <string>#include <iostream>#include <vector>using namespace std;class Man{public: Man() { this->count = 0; } void play() { count += 10; cout<<"I am playing"<<endl; } int getDrinkCou翻译 2020-06-21 10:38:53 · 444 阅读 · 0 评论 -
int * 类型的实参与 LPDWORD 类型的形参不兼容
int * 类型的实参与 “LPDWORD” 类型的形参不兼容解决方案按住CTRL+左键, 进入这个函数 WSASend按住CTRL+左键, 进入总结:int* 不行 要用 unsigned long , 因为 VS2019 严格要求, 这样就没有报错了.原创 2020-06-17 23:56:32 · 3321 阅读 · 1 评论 -
错误 C4996 inet_addr: Use inet_pton() or InetPton() instead or defin
错误 C4996 ‘inet_addr’: Use inet_pton() or InetPton() instead or defin解决方案:右键->属性右键->属性->把 SDL检查 改为 否原创 2020-05-23 10:47:41 · 731 阅读 · 0 评论