C/C++修行 第3页
-
C++ WebHook发送信息
尼玛没什么好说的了,让我上代码,已经给大家封装为函数方便使用#include <iostream> #include <string> #include <curl/curl.h> using namespace std; string GbkToUtf8(const char *src_str) { int len = MultiByteToWid...
-
C++ GBK UTF8两种编码转换
尼玛这个我不好截图,因为这个要截图的话我得有两种编码的字符串,但是事实上我没有!!!哈哈哈哈#include <iostream> #include <string> #include <curl/curl.h> using namespace std; string GbkToUtf8(const char *src_str) { int len =&nbs...
-
C++ 将字符串写入剪切板
将字符串写入剪切板 C++本身不行的,只能利用WIN API#include <windows.h> #include <string> #include <fstream> #include <string.h> #include <iostream> using namespace std; int main() { ...
-
C++ 根据进程名称获取进程id+根据进程id获取进程路径
源代码如下:已经做成了函数,大家可以自行调用#include <windows.h> #include <stdint.h> #include <tlhelp32.h> #include <stdio.h> #include <windows.h> #include <Psapi.h> #include <iostream> #include&nbs...
-
C++ 之 std::string 转LPCSTR
哎哟,转这个可把我给难死了,转这个转了一个小时,代码如下#include<string> #include<iostream> using namespace std; string str = "老子想杀了你"; LPSTR str1 = const_cast<char *>(str.c_str());...
-
C++ libcurl的CURLcode转存为string类型
两段代码解决一切原代码,没有转存string#include <iostream> #include <string> #include <curl/curl.h> using namespace std; int main() { system("chcp 65001");//很多时候,中文乱码,加上就行了 CURL *hnd = cur...
-
C++ libcurl各种函数API解析
网站是英文版,而且是curl官方网站,总的来说还是非常的不错的,虽然是英语,英语好的应该看得懂吧。哈哈,此篇博客没有什么目的只是方便我下次查询的时候,更容易到而已https://curl.haxx.se/libcurl/c/...
-
C++利用curl库来进行的GET请求 超级便捷
真好,有 C++库真的超方便#include <iostream> #include <string> #include "curl/curl.h" using namespace std; int main() { system("chcp 65001");//很多时候,中文乱码,加上...
-
curl安装配置完毕后该如何使用
其实呢curl是真的大哥库啊,什么库都没这么麻烦我们先新建一个项目哈,不同VS版本可能建的方式不一样,大家多百度一下吧。点击下一步点击完成。。。。进来以后不要慌着添加代码,首先把debug换成release ,因为debug是调试版,release是发布版,代码优化做的更好,这个库接近30MB,有点大,用debug容易崩溃然后添加源文件,一点问题都没有。写入代码#include <iostream> #include <stdio.h> #include &...
-
VS2013 C++ curl库的安装
安装方法分为两大类第一类:程序一键安装要求:编译环境为VS2013程序下载链接:https://pan.baidu.com/s/13sCwJE06j8Hhe-ZK2l6WXw(由于真的是一键安装,太傻逼了,我就不教学了,你只要下载了打开就都会用)第二类:手动安装要求:是VS任何版本都可以第一步:打开VS2013 开发人员命令提示工具所在目录我们要的就是这个然后呢,下载curl的压缩包:https://pan.baidu.com/s/16aTfDc48hB2Mbw8Sg1rXGQ (你们也可以自己下载官网的...