我有两个数组。 [英] I have two arrays.

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

问题描述

我需要从array1中获取元素并将它们放在array2的末尾。之后array1将需要为空,因此不需要复制。想法?或者有什么地方我可以去阅读它吗?

And I need to take the elements from array1 and put them at the end of array2. array1 will need to be empty afterwards, so no copying. Ideas? Or is there somewhere I can go to read about it?

推荐答案

凹凸

Up

我的

发布?
Bump
Up
My
Post?


我不明白这是什么问题?你知道如何在数组中放置一个值吗?为什么不是只使用某种循环将array1中的值放在array2的值中(在结尾或任何地方)?


-blazed
I don''t understand what''s the problem? You know how to put a value in an array right? Why don''t you just put the values in array1 ... in the values of array2 (at the end or wherever you mean) using a loop of some kind?

-blazed


问题是我正在编写一个方法,测试程序必须能够获取第一个数组中的元素OUT并将它们放入另一个数组中。
The problem is I''m writing a method and the test program has to be able to take the elements OUT of the first array and put them into another.


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

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