摘要:
#include <Windows.h> #include <iostream> #include <tchar.h> #include <shlwapi.h> #pragma comment(lib,"shlwapi.lib") int main() { //1.获取自身路径 TCHAR szSe 阅读全文
摘要:
/* MMSystem.h 多媒体头文件 WINMM.LIB 静态库 BOOL PlaySound(LPCSTR pszSound, // 如:C:\\音乐.wav HMODULE hmod, //加载方式,除资源方式加载音乐,一般为NULL DWORD fdwSound); //播放模式 加载方式 阅读全文
摘要:
#include <Windows.h> #include <stdio.h> #include <tchar.h> #include <assert.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR 阅读全文
摘要:
#include <stdio.h> #include <windows.h> #include <malloc.h> #include <stdlib.h> LPVOID ReadFile(LPSTR szFileName) { FILE *pFile = NULL; DWORD dwFileSi 阅读全文
摘要:
#include <iostream> using namespace std; int main() { char* name[] = { "王莉","张绍然","尚迪"}; //[]优先级高于*,所以name是一个数组,数组里每个成员都是一个char* //如果用二维数组,每个数组成员都事先确定 阅读全文
摘要:
#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 = 阅读全文
摘要:
#include <stdio.h> int main() { int a = 0; loop: a++; printf("%d\n",a); if(a == 100) goto end; goto loop; end: return 0; } 阅读全文
摘要:
#include <stdio.h> int main() { //char s[] = {'h','e','l','l','o','\0'}; char s[] = {"hello"}; //这种方式可以省略结尾的\0 printf("%s\n",s);//利用%s参数,可以省略我们自己写循环,一 阅读全文
摘要:
#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 阅读全文
摘要:
Demo.h printf("hello "); printf("world"); Demo.cpp #include <stdio.h> #include <string.h> int main() { #include "Demo.h" return 0; } 阅读全文