首页 > 代码库 > c指针点滴5-指针变量计算

c指针点滴5-指针变量计算

//接口dll_declspec(dllexport) void  go(){    char *p1;    int  *p2;    p1 = (char*)0x30fa83;//每次运行exe的时候输出地址值不同    *p1= c;    p2 = (int *)0x30fa74;    *p2 = 300;}#include <stdio.h>#include <Windows.h>void main(){    char ch = A;    int num = 45;    double db = 12.5;    char *p1 = &ch;    int *p2 = &num;    double *p3 = &db;    printf("%x,%x,%x",p1,p2,p3);    printf("\n%c,%d,%f",*p1,*p2,*p3);    while(1)    {        printf("\n张三的级别是%c,张三年龄是%d,张三的账户有%fW",ch,num,db);        Sleep(5000);    }    getchar();}

功能:通过注射进内存 改变其值

c指针点滴5-指针变量计算