在Collection怎样删除重复的项呢?这个算法一直没有想出来啊
谢谢
谢谢
解决方案 »
- 在vb中,怎样 确定text中的类型,
- 请问如何编写程序判断一个数是不是偶数,Clear_Zero快来帮我!
- 多会话ID的复杂升级逻辑
- 麻烦大家帮我写一两句源程序
- 如何用API设置insert键??
- vb中控件编写的问题。
- 当控件大小改变时,控件内的绘图(比如线条)与控件成比例变化,用什么事件?
- 请问哪有VB的两张帮助光盘下载?
- 如何通过SQL语句操作2个表中的字段,使其增加关系?
- 感知分辨率变化
- 急急!!!如何实现这个功能???
- 编译时报错:procedure declaration does not match description of event or procedure having the same name
dim j as integerfor i=lbound(str) to ubound(str)
for j=Lbound(str)+1 to ubound(str)
if str(i+j)=str(i) then
str(i+j)=0
end if
next
next给个数组的比较算法,不知道效率如何,召唤高效率比较算法~~~
dim i as integer
dim j as integerfor i=0 to ubound(str)
for j=i to ubound(str)
if str(i+j)=str(i) then
str(i+j)=0
end if
next
next
Dim col As New Collection
col.Add 1
col.Add 2
col.Add 1Dim i As Integer, j As Integer, ColContext As String
For i = 1 To col.Count
ColContext = ColContext & " " & i & ":" & col.Item(i)
Next i
MsgBox ColContext
For i = 1 To col.Count
For j = i + 1 To col.Count
If col.Item(i) = col.Item(j) Then
col.Remove (j)
End If
Next j
Next i
ColContext = ""
For i = 1 To col.Count
ColContext = ColContext & " " & i & ":" & col.Item(i)
Next i
MsgBox ColContext