删除数组元素 [英] Deleting Array Element

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

问题描述

如何删除数组中的一个或多个元素。

让a [] = {1,2,3,4,5}现在我想发送第三个元素''3 ''到一个

数组b [10]并从a中删除元素。


我该怎么办?

How can I delete one or more elements of an array.
let a[]={1,2,3,4,5} Now i want to send the third element ''3'' to an
array b[10] and remove the element from a.

How can I do it?

推荐答案

Umesh写于06/13/07 10:46,:
Umesh wrote On 06/13/07 10:46,:

如何删除数组中的一个或多个元素。

让a [] = {1,2,3,4,5}现在我想将第三个元素3发送到

数组b [10]并从a中删除元素。


我该怎么办?
How can I delete one or more elements of an array.
let a[]={1,2,3,4,5} Now i want to send the third element ''3'' to an
array b[10] and remove the element from a.

How can I do it?



你不能。


数组有五个元素,a [0]到[4],和

没有办法改变它。你最多可以改变存储在这些元素中的值;例如,

您可以将它们更改为{1,2,4,5,-1}。但是你

不能让元素消失。


-
Er ********* @ sun.com


如何删除重复数组中的条目?

How can I remove duplicate entries from an array?


Umesh说:
Umesh said:

如何删除重复的条目数组?
How can I remove duplicate entries from an array?



用唯一条目替换它们。


-

Richard Heathfield
Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上述域名中, - www。

By replacing them with unique entries.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.


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

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