不知道是大问题还是小问题
我在VC环境下建立了一个WIN32的简单应用程序项目,然后在里头放置了如下对所输入的字符进行加密算法并显示加密结果,代码如下:
int main()
{
MD5_CTX context;
unsigned char digest[16];
memset(digest,0,16);
CString m;//错误:'CString' 以及'm': undeclared identifier
int len;
cin>>"请输入字符串";
cin>>m;
len=m.GetLength();//错误:left of '.GetLength' must have class/struct/union type
MD5Init(&context);
MD5Update (&context, (unsigned char*)m, len);
MD5Final (digest, &context);
cout<<"the result is\n";
long old_options = cout.flags(ios::hex);
for(int i =0;i<16;i++)
{
cout<<(int)digest[i];
}
cout.flags(old_options);
return 0;
}
这该怎么解决