📄 creditverification.cpp
字号:
// CreditVerification.cpp
#include "stdafx.h"
#define _DLL
#include "creditverification.h"
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD ul_reason_for_call, LPVOID lpReserved)
{
return TRUE;
}
void CCreditVerification::SetCardType(char* s)
{
if (0 == strcmp("Visa", s))
m_type = Visa;
else if (0 == strcmp("MasterCard", s))
m_type = MasterCard;
else m_type = Amex;
}
bool CCreditVerification::VerifyCardNumber(long n)
{
if (m_type == Visa)
return (n % 2);
else if (m_type == MasterCard)
return (n % 3);
else if (m_type == Amex)
return (n % 5);
else return false;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -