会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
首页
新随笔
管理
订阅
2021年2月19日
拷贝自身至系统路径(Win10需要以管理员身份运行,未包含提权代码)
摘要: #include <Windows.h> #include <iostream> #include <tchar.h> #include <shlwapi.h> #pragma comment(lib,"shlwapi.lib") int main() { //1.获取自身路径 TCHAR szSe
阅读全文
posted @ 2021-02-19 02:30 ヤ玥夜ゞ
阅读(171)
评论(0)
推荐(0)
2020年7月14日
VC++ PlaySound mciSendString播放音乐
摘要: /* MMSystem.h 多媒体头文件 WINMM.LIB 静态库 BOOL PlaySound(LPCSTR pszSound, // 如:C:\\音乐.wav HMODULE hmod, //加载方式,除资源方式加载音乐,一般为NULL DWORD fdwSound); //播放模式 加载方式
阅读全文
posted @ 2020-07-14 14:30 ヤ玥夜ゞ
阅读(444)
评论(0)
推荐(0)
VC++ assert、OutputDebugString、GetLastError、TRACE 使用
摘要: #include <Windows.h> #include <stdio.h> #include <tchar.h> #include <assert.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
阅读全文
posted @ 2020-07-14 13:44 ヤ玥夜ゞ
阅读(364)
评论(0)
推荐(0)
2020年6月11日
简单PE文件读取
摘要: #include <stdio.h> #include <windows.h> #include <malloc.h> #include <stdlib.h> LPVOID ReadFile(LPSTR szFileName) { FILE *pFile = NULL; DWORD dwFileSi
阅读全文
posted @ 2020-06-11 03:10 ヤ玥夜ゞ
阅读(399)
评论(0)
推荐(0)
2020年6月8日
C语言 字符指针数组使用
摘要: #include <iostream> using namespace std; int main() { char* name[] = { "王莉","张绍然","尚迪"}; //[]优先级高于*,所以name是一个数组,数组里每个成员都是一个char* //如果用二维数组,每个数组成员都事先确定
阅读全文
posted @ 2020-06-08 12:11 ヤ玥夜ゞ
阅读(437)
评论(0)
推荐(0)
C语言 字符串倒序输出
摘要: #include <stdio.h> #include <string.h> void reverse(char* s) { char *p,*q,temp; p = s; q = s + strlen(s) - 1; while(p < q) { temp = *p; *p = *q; *q =
阅读全文
posted @ 2020-06-08 11:05 ヤ玥夜ゞ
阅读(1203)
评论(0)
推荐(0)
2020年6月7日
C语言 goto实现循环
摘要: #include <stdio.h> int main() { int a = 0; loop: a++; printf("%d\n",a); if(a == 100) goto end; goto loop; end: return 0; }
阅读全文
posted @ 2020-06-07 17:47 ヤ玥夜ゞ
阅读(235)
评论(0)
推荐(0)
2020年6月5日
printf 输出字符数组
摘要: #include <stdio.h> int main() { //char s[] = {'h','e','l','l','o','\0'}; char s[] = {"hello"}; //这种方式可以省略结尾的\0 printf("%s\n",s);//利用%s参数,可以省略我们自己写循环,一
阅读全文
posted @ 2020-06-05 14:06 ヤ玥夜ゞ
阅读(4676)
评论(0)
推荐(0)
二维字符数组输出
摘要: #include <stdio.h> int main() { char a[3][5] = {{'m','a','n','g','o'},{'a','p','p','l','e'},{'g','r','a','p','e'}}; for(int i = 0; i < 3; i++) { for(i
阅读全文
posted @ 2020-06-05 14:00 ヤ玥夜ゞ
阅读(830)
评论(0)
推荐(0)
2020年6月4日
C语言 文件包含输出hello world
摘要: Demo.h printf("hello "); printf("world"); Demo.cpp #include <stdio.h> #include <string.h> int main() { #include "Demo.h" return 0; }
阅读全文
posted @ 2020-06-04 13:31 ヤ玥夜ゞ
阅读(351)
评论(0)
推荐(0)
下一页