a の最後の charCString
をint
using CString::GetAt()
andに変換しようとしまし_tstoi()
たが、コンパイラは me を返しますerror C2065: '_tstoi' : undeclared identifier
。ヘッダーファイルを含める必要があると思いますが、#include "tchar.h"
成功しませんでした。
CString str = "something2";
int index = 0;
if (!str.IsEmpty())
{
index = _tstoi((char*)str.GetAt(str.GetLength() - 1));
}
編集:VC++ 6.0を使用しています