- 博客(5)
- 收藏
- 关注
原创 c++在Linux下把gbk编码转为utf8编码类型
/ 设置足够大,确保可以存放转换后的UTF-8字符串。std::string gbk_str = "你好,世界!// GBK编码的字符串。
2024-06-03 18:46:20 714
原创 error:connot bind non-const lvalue reference of type ‘std::__cxx11::string& {aka std::cxx11::basic_s
代码这样写则报如题所示的错误,error:connot bind non-const lvalue reference of type 'std::__cxx11::string& {aka std::cxx11::basic_string<char>&} to an rvalue of type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}‘,
2024-06-03 18:38:56 483
原创 Http请求发送过程中,Linux下tcpdump抓包命令详解
先启动tcpdump -i p8p1 host 10.116.20.33 -w sip.pcap这条命令,然后在发送http请求,之后刷新页面,就会出现一个sip.pcap的包,用wireshark打开即可(注意:在哪一个路径启动tcpdump -i p8p1 host 10.116.20.33 -w sip.pcap这条命令,抓到的包也就在该路径下)tcpdump抓包命令解析:p8p1是网卡,host是ip地址,只写一个host:10.116.20.33表示抓来回的包,sip.pcap是给抓到的包命名。
2024-05-31 17:40:10 181
原创 error:return-statement with no value, in function returning‘int‘ [-fpermissive] return;
return没有写返回值,改正后应为return 0;
2024-05-31 14:12:11 115 1
原创 error:undefined reference to ‘NET_DVR_Init‘ ld returned l exit status
L :表示要链接的库所在的目录。-L. / 表示要链接的库在当前目录, -L/usr/lib 表示要连接的库在/usr/lib下。目录在/usr/lib时,系统会自动搜索这个目录,可以不用指明。$(CMAKE_CURRENT_SOURCE_DIR}指向当前处理的 CMakeLists.txt 文件对应的构建目录,/lib指在lib目录下。-l(L的小写) :表示需要链接库的名称,注意不是库文件名称,比如库文件为 libhcnetsdk.so,那么库名称为hcnetsdk。
2024-05-30 15:50:13 416
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人