- 博客(5)
- 资源 (1)
- 收藏
- 关注
转载 c++ 内联函数 (讲解的TM真好)
1. 内联函数在C++中我们通常定义以下函数来求两个整数的最大值:复制代码 代码如下:int max(int a, int b){ return a > b ? a : b;}为这么一个小的操作定义一个函数的好处有:① 阅读和理解函数 max 的调用,要比读一条等价的条件表达式并解释它的含义要容易得多② 如果需要做任何修改,修改函数要比找出并修改每一处
2016-01-28 16:49:52 112144 39
原创 NSIS 静默安装
1:NSIS静默安装VC_X86.exeExecwait '"路径+exe" /q'这种情况下,若果exe没有“下一步这种过程”,程序会在读条解包时,静默安装EXE。2:NSIS静默安装.MSI文件ExecWait 'msiexec /i "$INSTDIR\drives\AppleMobileDeviceSupport64.msi" /qn /l* "$INSTDIR\drive
2016-01-21 11:11:53 9047
原创 c/c++ 拼接字符串 与函数传参时数组不是传值
c:#includeusing namespace std;int main(){const char *str1 = "ni hao";const char *str2 = "Li ming";const size_t len = strlen(str1)+strlen(str2);char *n_str = malloc((char*)*(len+1));//n
2016-01-14 18:11:27 1373
原创 vc 调用CMD执行本地操作
static int UnzipMethod(const TCHAR *command){PROCESS_INFORMATION processInformation = { 0 };STARTUPINFO startupInfo = { 0 };startupInfo.cb = sizeof(startupInfo);TCHAR *cmd = NULL;c
2016-01-05 16:47:31 2254
原创 VC下各种字节转码
/* 将TCHAR转为char */ char * TcharToChar(const TCHAR * tchar){int length = 0;char *res = NULL;if (tchar == NULL){return NULL;}length = WideCharToMultiByte(CP_UTF8, 0, tchar, -
2016-01-05 15:18:03 600
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人