150分-<<=------------*-*-*-*-*-*-解决我内存溢出的问题!!

WangTiger 2000-05-18 08:22:00
因为需要,所以用VB做了个查找替换文件中含有特定字符的软件,成功了,但是对小文件还可以,但是一到大文件,它老是报告错误信息:" 运行时错误 "6" 溢出 "...
后来,到了中国共享软件准备上载,突然发现一个软件和我的这个功能一模一样,只是他用的是控件,我用的是模块罢了(BTW:英雄所见略同(不要吐我口水.$%#).).
我下载了,和我的问题一样,也是"溢出"... 745啦!

我该怎么办????????????????????

救救我!!!!!!!!
...全文
297 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
hongfei 2000-06-26
  • 打赏
  • 举报
回复
please use the tree of losers to this problem.
To detail, see the book in data struction of tsinghua press.
or mail to hongfei@soim.net.
HaoGeGe 2000-05-26
  • 打赏
  • 举报
回复
VB中不是已经有一个替换函数了吗?

Replace Function


Description

Returns a string in which a specified substring has been replaced with another substring a specified number of times.

Syntax

Replace(expression, find, replace[, start[, count[, compare]]])

The Replace function syntax has these named arguments:

Part Description

expression Required. String expression containing substring to replace.

find Required. Substring being searched for.

replace Required. Replacement substring.

start Optional. Position within expression where substring search is to begin. If omitted, 1 is assumed.

count Optional. Number of substring substitutions to perform. If omitted, the default value is –1, which means make all possible substitutions.

compare Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings section for values.


Settings

The compare argument can have the following values:

Constant Value Description
vbUseCompareOption –1 Performs a comparison using the setting of the Option Compare statement.
vbBinaryCompare 0 Performs a binary comparison.
vbTextCompare 1 Performs a textual comparison.
vbDatabaseCompare 2 Microsoft Access only. Performs a comparison based on information in your database.


Return Values

Replace returns the following values:

If Replace returns
expression is zero-length Zero-length string ("")
expression is Null An error.
find is zero-length Copy of expression.
replace is zero-length Copy of expression with all occurences of find removed.
start > Len(expression) Zero-length string.
count is 0 Copy of expression.


Remarks

The return value of the Replace function is a string, with substitutions made, that begins at the position specified by start and and concludes at the end of the expression string. It is not a copy of the original string from start to finish.


--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
zroc 2000-05-25
  • 打赏
  • 举报
回复
大概是文件太大,内存装不下,用文件映射就可以了.
zroc 2000-05-25
  • 打赏
  • 举报
回复
大概是文件太大,内存装不下,用文件映射就可以了.
Sniper 2000-05-21
  • 打赏
  • 举报
回复
你是把整个文件读到内存中的吗?如果是,可以试试分段读入.
另外用内存映射数据文件可以很好地解决你的问题,它的特长就是处理大数据流.你可以参考一下《Windows高级编程指南》(第三版),不过是用C的API写的,不知道用VB可不可以用。或者你可以用C写个控制台程序。
墨梅无痕 2000-05-20
  • 打赏
  • 举报
回复
能提供你的核心算法的源码吗?
或者你该换一种全新的算法。
WangTiger 2000-05-20
  • 打赏
  • 举报
回复
惟有一种算法。。。

33,006

社区成员

发帖
与我相关
我的任务
社区描述
数据结构与算法相关内容讨论专区
社区管理员
  • 数据结构与算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧