📄 pointer.cpp
字号:
/********************************************************************
Copyright (c) Beijing Feitian Technologies
http://www.FTSafe.com
File : Pointer.cpp
Created: 2003/11/04
Author: yihai
Purpose: ?
Revision: ?
*********************************************************************/
// Pointer.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
#include <string.h>
#include <conio.h>
typedef void (* TPFN_ShowMsg)();
void ShowMsg()
{
printf("ShowMsg\n");
}
DWORD g_ShowMsgEntry = (DWORD)ShowMsg;
int main(int argc, char* argv[])
{
int iData = 0x44434241;
char* p;
int* q=&iData;
p = (char*)q;
char szBuf[128];
memset(szBuf,0,128);
strncpy(szBuf,p,4);
printf("%s\n",szBuf);
TPFN_ShowMsg pfnShowMsg =(TPFN_ShowMsg)g_ShowMsgEntry;
pfnShowMsg();
getch();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -