-
-
[算法]动词过去式还原程序(已更新)
-
发表于:
2007-7-10 18:40
7809
-
文章作者:sudami
信息来源:邪恶八进制信息安全团队(www.eviloctal.com)
刚上经常逛的另一个论坛,收到一个求助者的短信,让我帮他做这个题目:
// 打开文件
CStdioFile fText;
CFileException FileExc;
UINT nOpenFlags;
CString str;
nOpenFlags = CFile::modeReadWrite | CFile::modeCreate | CFile::modeNoTruncate;
if (!fText.Open(szBuffer, nOpenFlags, &FileExc))
{
FileExc.ReportError ();
return 0;
}
if ((fp = fopen (szBuffer, "wt")) == NULL)
{
::MessageBox (NULL, "Can not open it!", "sudami", MB_OK);
exit (1);
}
if (temp[i-3] == temp[i-4])
{
i = i - 3;
j = i - 1;
cout << "---->Result:" ;
while (i--)
{
cout << temp[j-i];
}
cout << endl;
cout << "Input:";
cin.getline (g_buffer, MAX_PATH);
Convert (g_buffer);
}
else
{
cout << "---->Result:" ;
i = i - 2;
j = i - 1;
while (i--)
{
cout << temp[j-i];
}
cout << endl;
cout << "Input:";
cin.getline (g_buffer, MAX_PATH);
Convert (g_buffer);
} // if
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!