
c++
mr. zing
freedom is the right of all sentient beings.
展开
-
vs6.0 镜像下载地址
visual basic 6.0visual c++ 6.0visual foxpro 6.0visual interdev 6.0visual j++...原创 2023-02-10 13:24:25 · 1960 阅读 · 0 评论 -
base64 计算长度
base64编码计算其长度公式原创 2022-10-24 20:54:12 · 483 阅读 · 0 评论 -
持久内存编程源码
持久内存编程(1~19章)源码原创 2022-05-03 16:51:18 · 320 阅读 · 0 评论 -
C++并发编程实战源码
C++并发编程实战源码原创 2022-05-02 17:02:32 · 2456 阅读 · 2 评论 -
ANSI C 标准的 6 个预定义宏
The compiler recognizes six predefined ANSI(American National Standards Institute) C macrosTable 1.1ANSI Predefined Macros__DATE__ // 当前源文件的编译日期。日期是格式为Mmm dd yyyy的字符串文字。月名Mmm与库函数asctime在time.h 中声明的日期相同。__FILE__ // 当前源文件的名称__FILE__;扩展为一个由双引...原创 2022-10-24 18:42:33 · 223 阅读 · 1 评论 -
形式参数中的 *&
有个例子void fndelete_1(int *&p){ //delete p; //p = NULL;}首先对参数中"int * & p"的理解:*号和&号都在类型声明中,表示参数是指针类型的引用。先分成左右两部分来看 (int *) ( & p)。A. 左边部分表示 int 类型的指针p, 应该没有问题。B. 右边部分&表示是对变量 p的引用,或是 p的别名。加上前面的部分,就是对 int 类型指针变量 p的引用(有点绕呢...) 举个例.原创 2020-08-25 15:22:52 · 1273 阅读 · 0 评论 -
get version from pe file
read version information from pe file原创 2021-12-22 19:33:17 · 164 阅读 · 0 评论 -
C/C++ linux下光标定位和清屏函数
C/C++ linux下光标定位和清屏函数printf("\033[47;31mhello world\033[5m");47是字背景颜色, 31是字体的颜色, hello world是字符串. 后面的\033[5m是控制码.颜色代码:QUOTE:字背景颜色范围: 40--49 字颜色: 30--39 40: 黑 30: 黑 41: 红 ...原创 2021-01-03 12:19:25 · 537 阅读 · 0 评论 -
C++ 数字前、后缀字母 0、0x、U、L、F
VC6 数字前、后缀字母 0、0x、U、L、F原创 2020-08-25 15:24:51 · 4358 阅读 · 1 评论 -
C++ cout 的一些格式化输出
C++ cout格式化输出cout<<std::setiosflags(std::ios_base::right)<<std::setw(20)<<"hello"<<endl;原创 2020-08-25 15:24:31 · 253 阅读 · 0 评论 -
vc6.0 链接错误 ' libcp.lib error LNK2001 unresolved external symbol ' 的处理
vc6.0 链接错误' libcp.lib error LNK2001 unresolved external symbol '的处理在编译链接(release)时产生如下错误:libcp.lib(locale.obj) : error LNK2001: unresolved external symbol _sprintflibcp.lib(wlocale.obj) : error ...原创 2020-03-31 15:19:51 · 1554 阅读 · 0 评论 -
VC 设置控制台字体颜色
VC 设置控制台字体颜色void fnset_console_text_color(void){ HANDLE hco = NULL; CONSOLE_SCREEN_BUFFER_INFO csbi = {0}; WORD wcolor = FOREGROUND_RED; hco = GetStdHandle(STD_OUTPUT_HANDLE); ...原创 2020-03-31 12:10:09 · 260 阅读 · 0 评论 -
判断当前win32程序是否在windows 64位环境下运行
判断当前win32程序是否在windows 64位环境下运行bool fnis_wow64_process(void){ int bIsWow64 = 0; typedef int (__stdcall *PFN_ISWOW64PROCESS)(void *,int *); PFN_ISWOW64PROCESS fnIsWow64Process = (PFN_I...原创 2020-03-31 12:13:49 · 314 阅读 · 0 评论 -
C++ 的强制转换
C++ 的强制转换reinterpret_caststatic_castdynamic_castconst_cast参考:https://www.cnblogs.com/lpxblog/p/5949732.html原创 2020-03-31 15:17:17 · 146 阅读 · 0 评论 -
C++ 重载 cout 输出 __int64
#include <iostream>using std::cout;std::ostream & operator<<(std::ostream &os, unsigned __int64 inum){ char sznum[27] = {0};// maximum 18,446,744,073,709,551,616 sprintf(sz...原创 2020-01-09 16:03:07 · 621 阅读 · 0 评论 -
C++ cout 按2、8、10、16进制输出
#include <iostream>#include <bitset>using std::cout;using std::endl;int main(int argc,char *argv[],char *envp[]){ cout<<std::showbase<<std::dec<<"decimal: "<...原创 2020-02-19 15:04:14 · 736 阅读 · 0 评论 -
microsoft platform sdk\include\wspiapi.h(45) : error C2265: '<Unknown>' : reference to a zero-sized
microsoft platform sdk\include\wspiapi.h(45) : error C2265: '<Unknown>' : reference to a zero-sized array is illegalwspiapi.h 里缺少 #define _WSPIAPI_COUNTOF 语句!#include <iostream>#i...原创 2020-02-06 19:28:59 · 253 阅读 · 0 评论 -
winsock2.h(112) : error C2011: 'fd_set' : 'struct' type redefinition
winsock2.h(112) : error C2011: 'fd_set' : 'struct' type redefinition<windows.h>中已经包含了早期版本的<winsock.h> (windows socket 1.1)参照<stdafx.h>中的做法,在#include <windows.h> 前添加#de...原创 2020-02-06 19:40:43 · 449 阅读 · 0 评论 -
gethostbyname, gethostbyaddr
gethostbyname取ip地址, gethostbyaddr取域名#include <iostream>// #ifndef WIN32_LEAN_AND_MEAN// #define WIN32_LEAN_AND_MEAN// #endif#include <winsock2.h>#include <windows.h>#inclu...原创 2020-02-08 10:59:52 · 241 阅读 · 0 评论 -
C++ 将string转换成全小写
#include <iostream>#include <string>#include <algorithm>void main(){ std::string str; str.assign("Hello World!"); std::transform(str.begin(),str.end(),str.begin(),t...原创 2019-12-16 09:42:42 · 5517 阅读 · 0 评论 -
判断PE文件是不是64位的函数
#include <iostream>#include <fstream>#include <windows.h>#include <winnt.h>bool pe_is_64bit(const char *pfile){ bool bret = false; IMAGE_DOS_HEADER idosh = {0}; I...原创 2019-12-16 09:30:12 · 462 阅读 · 0 评论