对数组的偏移引用? [英] an offset reference to an array?

查看:72
本文介绍了对数组的偏移引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想创建一个数组,指向不同阵列的中间

部分。


例如

原始数组> [0] [1] [2] [3] [4] [5] [6] [7]

第二个数组 - ----------- ^

[0] [1] [2] [3] [4] [5]


这是可能吗??我认为它可以在

c ++中完成,但我不知道如何在vb.net中完成它

如果可能的话。


感谢所有帮助

解决方案

你为什么要这样做?


你想要一个阵列数组还是什么?

也许告诉我们应用程序会有所帮助....至少补了一下

应用你想要完成的任务。


Shane


" jamie" <一个******* @ discussions.microsoft.com>在留言中写道

news:6b **************************** @ phx.gbl ... < blockquote class =post_quotes>
我希望创建一个指向不同数组的中间部分的数组。

例如
原始数组> [0] [1] [2] [3] [4] [5] [6] [7]
第二阵列------------- ^
[0] [1] [2] [3] [4] [5]

这一切都可能吗?我认为它可以在
c ++中完成,但是如果有可能的话,我也不知道如何在vb.net中完成它。

感谢所有帮助



好的....


我有一个数组需要被分割的数据。

数组中的数据包都是标准的,所以它们

在特定区域有字节。

我可以计算到它的偏移量piticular数据包,

然后偏移到一个特定字节或....


有另一个数组指向数据包的开头。


我不知道这是不是很有意义。

(我对咖啡的力量有点低。)

---- - 原始消息-----
你为什么要这样做?

你想要一个阵列或什么?
也许告诉我们应用程序会很有帮助......只需要
就可以完成你想要完成的任务。

Shane

jamie <一个******* @ discussions.microsoft.com>写在
messagenews:6b **************************** @ phx.gbl ...


我希望创建一个数组,指向不同数组的
中间部分。

例如
原始数组> [0] [1] [2] [3] [4] [5] [6] [7]
第二阵列------------- ^
[0] [1 ] [2] [3] [4] [5]

这一切都可能吗?我认为它可以在c ++中完成
,但是如果有可能的话,我也不知道如何在vb.net中完成它。

感谢所有帮助





" jamie" <一个******* @ discussions.microsoft.com>在留言中写道

news:6b **************************** @ phx.gbl ... < blockquote class =post_quotes>
我希望创建一个指向不同数组的中间部分的数组。

例如
原始数组> [0] [1] [2] [3] [4] [5] [6] [7]
第二阵列------------- ^
[0] [1] [2] [3] [4] [5]

这一切都可能吗?我认为它可以在
c ++中完成,但是如果有可能的话,我也不知道如何在vb.net中完成它。

感谢所有帮助




您使用的是ArrayList吗?


最诚挚的问候,


Andy



I wish to create an array that points to, say, the middle
section of a different array.

eg
Original array >[0] [1] [2] [3] [4] [5] [6] [7]
second array-------------^
[0] [1] [2] [3] [4] [5]

Is this at all possible?? I think that it could be done in
c++, but I dont have a clue as to how to do it in vb.net
if it is even possible.

thanks for all help

解决方案

Why would you want to do this???

Are you wanting an array of arrays or what?
Maybe telling us the application would be helpful....at least a made up
application of what you want to accomplish.

Shane

"jamie" <an*******@discussions.microsoft.com> wrote in message
news:6b****************************@phx.gbl...


I wish to create an array that points to, say, the middle
section of a different array.

eg
Original array >[0] [1] [2] [3] [4] [5] [6] [7]
second array-------------^
[0] [1] [2] [3] [4] [5]

Is this at all possible?? I think that it could be done in
c++, but I dont have a clue as to how to do it in vb.net
if it is even possible.

thanks for all help



Okay....

I have an array full of data that needs to be parced.
The packets inside the array are all standard, so they
have bytes in piticular areas.
Either I can calculate an offset to that piticular packet,
then the offset to a piticular byte or....

have another array pointing to the beginning of the packet.

I dont know if this makes sence.
(Im a little low on caffeen power.)

-----Original Message-----
Why would you want to do this???

Are you wanting an array of arrays or what?
Maybe telling us the application would be helpful....at least a made upapplication of what you want to accomplish.

Shane

"jamie" <an*******@discussions.microsoft.com> wrote in messagenews:6b****************************@phx.gbl...


I wish to create an array that points to, say, the middle section of a different array.

eg
Original array >[0] [1] [2] [3] [4] [5] [6] [7]
second array-------------^
[0] [1] [2] [3] [4] [5]

Is this at all possible?? I think that it could be done in c++, but I dont have a clue as to how to do it in vb.net
if it is even possible.

thanks for all help


.



"jamie" <an*******@discussions.microsoft.com> wrote in message
news:6b****************************@phx.gbl...


I wish to create an array that points to, say, the middle
section of a different array.

eg
Original array >[0] [1] [2] [3] [4] [5] [6] [7]
second array-------------^
[0] [1] [2] [3] [4] [5]

Is this at all possible?? I think that it could be done in
c++, but I dont have a clue as to how to do it in vb.net
if it is even possible.

thanks for all help



Are you using an ArrayList?

Best Regards,

Andy


这篇关于对数组的偏移引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆