| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 389 人关注过本帖
标题:【问题】我现在有一串代码,如何使用VS2008将他变成应用工具~~
只看楼主 加入收藏
leaf雪
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2013-12-31
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:2 
【问题】我现在有一串代码,如何使用VS2008将他变成应用工具~~
我想提取一个由二进制和文本组成的文本,代码已经完成了~~
但是不知道如何用VS2008将他变成一个提取工具~~~
搜索更多相关主题的帖子: 二进制 如何 
2013-12-31 11:29
yuccn
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:何方
等 级:版主
威 望:167
帖 子:6815
专家分:42393
注 册:2010-12-16
收藏
得分:10 
表示看不懂

我行我乐
公众号:逻辑客栈
我的博客:
https://blog.yuccn. net
2014-01-02 08:11
纸T0
Rank: 4
来 自:
等 级:业余侠客
威 望:2
帖 子:34
专家分:216
注 册:2013-11-16
收藏
得分:10 
是不是定义一个位置,读阳位置后的数据

你看看这个:

strstr, wcsstr, _mbsstr
Find a substring.

char *strstr( const char *string, const char *strCharSet );

wchar_t *wcsstr( const wchar_t *string, const wchar_t *strCharSet );

unsigned char *_mbsstr( const unsigned char *string, const unsigned char *strCharSet );

Routine Required Header Compatibility
strstr <string.h> ANSI, Win 95, Win NT
wcsstr <string.h> or <wchar.h> ANSI, Win 95, Win NT
_mbsstr <mbstring.h> Win 95, Win NT


For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version


Return Value

Each of these functions returns a pointer to the first occurrence of strCharSet in string, or NULL if strCharSet does not appear in string. If strCharSet points to a string of zero length, the function returns string.

Parameters

string

Null-terminated string to search

strCharSet

Null-terminated string to search for

Remarks

The strstr function returns a pointer to the first occurrence of strCharSet in string. The search does not include terminating null characters. wcsstr and _mbsstr are wide-character and multibyte-character versions of strstr. The arguments and return value of wcsstr are wide-character strings; those of _mbsstr are multibyte-character strings. These three functions behave identically otherwise.

Generic-Text Routine Mappings

TCHAR.H Routine  _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined
_tcsstr strstr  _mbsstr  wcsstr  


Example

/* STRSTR.C */

#include <string.h>
#include <stdio.h>

char str[] =    "lazy";
char string[] = "The quick brown dog jumps over the lazy fox";
char fmt1[] =   "         1         2         3         4         5";
char fmt2[] =   "12345678901234567890123456789012345678901234567890";

void main( void )
{
   char *pdest;
   int  result;
   printf( "String to be searched:\n\t%s\n", string );
   printf( "\t%s\n\t%s\n\n", fmt1, fmt2 );
   pdest = strstr( string, str );
   result = pdest - string + 1;
   if( pdest != NULL )
      printf( "%s found at position %d\n\n", str, result );
   else
      printf( "%s not found\n", str );
}


Output

String to be searched:
   The quick brown dog jumps over the lazy fox
            1         2         3         4         5
   12345678901234567890123456789012345678901234567890

lazy found at position 36

2014-01-02 20:01
快速回复:【问题】我现在有一串代码,如何使用VS2008将他变成应用工具~~
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018953 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved