//这是取出LISTBOX里面的一个字符串
int index;
CString str;
index=m_listbox.GetCurSel();
m_listbox.GetText(index);
AfxMessageBox(str);
//提取出来了,弹出的对话框也是显示正确的,str为 {买进书本:100},我要提取:后的100这个数
我看了很多人是用strtok,但是VS2008好像不行,VC6.0可以
//这是一段例子,用strtok可以取出来,这在VC6.0上面可以.但是VS2008用不了char pBuffer[128]; 
sprintf(pBuffer,"how/are/you/fine/thank/you");   //用VS2008这里出现警告,他说sprintf不安全,用sprintf_s
char* token; 
token = strtok(pBuffer,"/");                //用VS2008这里出现警告,他说strtok不安全,用strtok_swhile (token != NULL)

  AfxMessageBox(token);         //这里出错.
  token = strtok(NULL,"/");                   //用VS2008这里出现警告,他说strtok不安全,用strtok_s
 }  找了很长时间都不知道怎么改,请各位指教下吧,谢谢了