C++
许愿35岁退休
这个作者很懒,什么都没留下…
展开
-
C++ ERROR:error: passing 'XXX' as 'this' argument of 'XXX' discards qualifiers
遇到了如题目的这种错误: error: passing ‘XXX’ as ‘this’ argument of ‘XXX’ discards qualifiers 如何产生的? 我将一个const变量传入了一个非const函数,这是产生的场景。 如何解决?两种方式: 方式1、将const修饰的变量的const去掉,例如之前是 const Book book; 现在改成Book book; 方式2、...原创 2018-09-23 00:09:20 · 7197 阅读 · 0 评论 -
C++CURL库的一个bug,CURLOPT_TIMEOUT_MS设置时间小于1s直接报错
解决办法: This is a bug of CURL. If your timeout setting is less than 1s, it will directly return an error. Solution is: curl_easy_setopt(conn, CURLOPT_NOSIGNAL, 1); conn is the pointer of CURL, e.g.: CUR...原创 2019-09-29 14:08:57 · 1821 阅读 · 0 评论