📄 readkey.cpp
字号:
// readkey.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include <windows.h>
#include <io.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
int iRet = access("key.dat",0);
if(iRet!=-1) //如key.dat存在
{
//执行程序的正常功能
//…
MessageBox(NULL,"工作正常","信息",MB_OK);
}
else //如key.dat不存在
{
MessageBox(NULL,"请注册后使用","Error",MB_OK);
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -