随笔分类 - C/C++
c学习笔记
摘要://计算DLL路径名所需的字节数 DWORD dwSize = (lstrlenW(pszLibFile) + 1) * sizeof(wchar_t); // 获取传递进程ID的进程句柄 HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATIO
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" int mystrlen(char* dest) { int length=0; while (*dest!='\0') { length++; dest++; } return length; } char *mystr
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" void main() { int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12}; for (int i=0;i<3;i++) { for (int j=0;j<4;j++) { printf(
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" #include "time.h" #define N 1024 void main() { int a[N]={0}; for (int i=0;i<N;i++) { a[i]=i; printf("%-6d",a[i]
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" #include "time.h" #define N 100 void main() { int a[N]={0}; time_t ts; srand(unsigned int(time(&ts))); for (int
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" #include "time.h" void main() { int a[10]={0}; time_t ts; srand(unsigned int(time(&ts))); for (int i=0;i<10;i++
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" //二维数组的初始化 #define N 10 void mainx() { int a[3][4]={0}; for (int i=0;i<3;i++) { for (int j=0;j<4;j++) { a[i][j]
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" #define PATH "c:\\demo.txt" #define NewPATH "c:\\demonew.txt" #define N 100 void mainx() { char Arry[N]={0}; FI
阅读全文
摘要:#include "stdio.h" #include "stdlib.h" #include <malloc.h> #include "string.h" #include "windows.h" #define path "c:\\calc.exe" #define Newpath "c:\\c
阅读全文
摘要:// 数据分离和逆序输出.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdio.h" #include "stdlib.h" int Getwei(int n
阅读全文
摘要:#include "stdio.h"//#include "string.h" int Mystrlen(char* dest){ int length=0; while (*dest!=0) { dest++; length++; } return length;} char* Mystrcat(
阅读全文
摘要:#include <stdio.h> unsigned char Buff[20]={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A, 0x0B,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14 }; cha
阅读全文
摘要:#include <stdio.h> struct A { int a; int b; }; struct AA { char a; short b; int c; int d[10]; A s; }; AA xx; void Function() { xx.a=1; xx.b=2; xx.c=3;
阅读全文

浙公网安备 33010602011771号