随笔分类 -  c++语言

上一页 1 ··· 21 22 23 24 25 26 下一页

c++语言
摘要:.openssl安装/usr/local/ssl下,在gcc的时候加上-I/usr/local/ssl/include/ -lssl -lcrypto -ldl -L/usr/local/ssl/lib 阅读全文

posted @ 2020-11-20 22:13 lydstory 阅读(206) 评论(1) 推荐(0)

摘要:mips32系统上编译thrift有问题 阅读全文

posted @ 2020-11-19 14:19 lydstory 阅读(65) 评论(0) 推荐(0)

摘要:FILE* fp=fopen(sFileName,"rb"); fseek(fp,0,SEEK_END); int len = ftell(fp); fseek(fp,0,SEEK_SET); char* s = (char*)malloc(len); fread(s,1,len,fp); fclo 阅读全文

posted @ 2020-11-13 14:32 lydstory 阅读(229) 评论(0) 推荐(0)

摘要:头文件之后using namespace std; 头文件之后using namespace std; 头文件之后using namespace std; 注意 必须先include 然后namespace 阅读全文

posted @ 2020-10-20 19:45 lydstory 阅读(135) 评论(0) 推荐(0)

摘要:二维字符数组。char s[16][5]={"0000","0001",...};cout<<s[k]<<endl; 阅读全文

posted @ 2020-08-24 13:50 lydstory 阅读(542) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2020-07-17 11:03 lydstory 阅读(236) 评论(0) 推荐(0)

摘要:#include "stdafx.h" #include<winsock2.h> #include <stdio.h> #pragma comment(lib, "ws2_32.lib") char m_sznode[32+1] = {0}; int GetComputerName(char *lp 阅读全文

posted @ 2020-05-21 20:38 lydstory 阅读(208) 评论(0) 推荐(0)

摘要:#pragma once #include <windows.h> #ifdef FONTREPLACE_EXPORTS #define FONTREPLACE_API __declspec(dllexport) #else #define FONTREPLACE_API __declspec(dl 阅读全文

posted @ 2020-02-19 04:00 lydstory 阅读(161) 评论(0) 推荐(0)

摘要:Google开放HTML5解析库Gumbo的源代码 Google开放HTML5解析库Gumbo的源代码 阅读全文

posted @ 2020-02-18 14:00 lydstory 阅读(238) 评论(0) 推荐(0)

摘要:apache::thrift::server 阅读全文

posted @ 2020-02-18 13:57 lydstory 阅读(152) 评论(0) 推荐(0)

摘要:https://www.jianshu.com/p/1e6315145fcf 阅读全文

posted @ 2020-02-18 13:52 lydstory 阅读(535) 评论(0) 推荐(0)

摘要:变量加空格,if空行 变量加空格,if空行 变量加空格,if空行 阅读全文

posted @ 2020-02-17 11:16 lydstory 阅读(754) 评论(0) 推荐(0)

摘要:#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/stat.h> #include <unistd.h> //获取文件的大小 int get_file_size(int f) { struct stat st; fstat(f, &st); return st.st_size; } int main(vo 阅读全文

posted @ 2020-01-17 14:02 lydstory 阅读(328) 评论(0) 推荐(0)

摘要:#include <iostream> typedef unsigned int FX_DWORD; typedef unsigned long long FX_UINT64; typedef unsigned int FX_UINTPTR; int main() { FX_DWORD i = ((FX_DWORD)(FX_UINTPTR)1) >> 4; std::cout << i << st 阅读全文

posted @ 2020-01-17 11:24 lydstory 阅读(142) 评论(0) 推荐(0)

摘要:这是位运算符中的右移运算符:a>>4表示将a的个二进制位右移4位,移到右端的低位被舍弃,对无符号数,高位补0例如:a=017时:a的值用二进制形式表示为:00001111,a>>4为:00000000|1111【后面的1111舍弃】右移一位相当于除以2,右移n位,就相当于除以2^n。 阅读全文

posted @ 2020-01-17 10:59 lydstory 阅读(2347) 评论(0) 推荐(0)

摘要:FX_BOOL Lookup(void* key, void*& rValue) const; char *avoid *pvoid *&rValue=prValue表示是void*类型的引用。这里&表示引用p=(void*)(&a) 。表示取a的地址,并将改地址强制转换为(void *)类型,这里 阅读全文

posted @ 2020-01-17 10:50 lydstory 阅读(164) 评论(0) 推荐(0)

摘要:#define FX_FINAL #define FX_OVERRIDE 阅读全文

posted @ 2020-01-17 02:37 lydstory 阅读(400) 评论(0) 推荐(0)

摘要:参考c++: fstream file("/root/bbb.pdf", ofstream::app | ios::binary | ofstream::out); if (!file){ cerr << "open sec.txt failure" << endl; } for ( int i = 阅读全文

posted @ 2020-01-14 10:17 lydstory 阅读(581) 评论(0) 推荐(0)

摘要:https://github.com/wangyi160/bitcoin 阅读全文

posted @ 2020-01-09 10:54 lydstory 阅读(111) 评论(0) 推荐(0)

摘要:wchar_t returnString1[5120]; setlocale(LC_ALL, "UTF-8"); int nLen=wcstombs(NULL, returnString1, 0); char* m_char=new char[nLen + 1]; memset(m_char, 0, nLen + 1); int nRet=wcstombs(m_char, retstruc.ret 阅读全文

posted @ 2020-01-03 09:52 lydstory 阅读(397) 评论(0) 推荐(0)

上一页 1 ··· 21 22 23 24 25 26 下一页

导航