如何实现以逗号隔开组成多值字段查询 如何实现以逗号隔开组成多值字段查询strtok实现! 知道的高手 给个例子! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void QueryResults::OnChangeEdit1() { //2010-12-07 CString editstr; m_list.DeleteAllItems(); UpdateTable(); m_local.GetWindowText(editstr); if(editstr.IsEmpty()) { return; } if (editstr == _T(" ")) { return; } for(int i=0;i<m_list.GetItemCount();i++) { CString listitemstr=m_list.GetItemText(i,2); if(listitemstr.Find(editstr)!=-1)//找到 { m_list.DeleteItem(i); i--; } }} #include <string.h>#include <stdio.h>char string[] = "A string\tof ,,tokens\nand some more tokens";char seps[] = " ,\t\n";char *token;void main( void ){ printf( "%s\n\nTokens:\n", string ); /* Establish string and get the first token: */ token = strtok( string, seps ); while( token != NULL ) { /* While there are tokens in "string" */ printf( " %s\n", token ); /* Get next token: */ token = strtok( NULL, seps ); }} 关于远程屏幕监视.... Double转CString问题~~ fseek,fopen,fwrite的问题? VC6 中的 Registered ActiveX Controls 在VC2003和2005 中放到哪里去了? 菜鸟求助!急。。。在vc++中:1、如何加载ocx控件,2、如何可使vc++界面自由拉伸? 微软最新的XML SDK哪里有下载? 小小动画 标准之争 谁做裁判? 这里有多少人搞cti?调查!!!进者有分 巨难的问题,挑战调试极限,为VC超级高手准备 MCIWndCreate 问题 关于子窗口和父窗口的消息问题
{
//2010-12-07
CString editstr;
m_list.DeleteAllItems();
UpdateTable();
m_local.GetWindowText(editstr);
if(editstr.IsEmpty())
{
return;
}
if (editstr == _T(" "))
{
return;
}
for(int i=0;i<m_list.GetItemCount();i++)
{
CString listitemstr=m_list.GetItemText(i,2);
if(listitemstr.Find(editstr)!=-1)//找到
{
m_list.DeleteItem(i);
i--; }
}}
#include <string.h>
#include <stdio.h>char string[] = "A string\tof ,,tokens\nand some more tokens";
char seps[] = " ,\t\n";
char *token;void main( void )
{
printf( "%s\n\nTokens:\n", string );
/* Establish string and get the first token: */
token = strtok( string, seps );
while( token != NULL )
{
/* While there are tokens in "string" */
printf( " %s\n", token );
/* Get next token: */
token = strtok( NULL, seps );
}
}