比较多维数组 [英] Comparing Multidimensional Arrays

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

问题描述

各位大家好,我的问题是:

我有两个多维数组,我必须通过比较这两个来创建第三个(以后用)。这是我的示例代码:

Hello everybody, my question is this:
I have two multidimensional arrays and I have to create a third one (for later use) from comparing these two. Here is my example code:

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

如果要保留结构,请创建数组在第三个嵌套循环之外并在其中填充(如果语句 - 第15-17行),然后将该数组推到该循环之外。
If you want to keep the structure, create the array outside the third nested loop and populate within it (if statement - line 15-17), then push the array outside that loop.


谢谢你,我尝试了你在说什么但是我害怕我做错了什么 - 请你硬编码你的解决方案吗?这对我很有帮助(我不是专家编码员......)。无论如何,非常感谢你的帮助。
Thank you acoder, I tried what you''re saying but I''m afraid I''m doing something wrong - Should you please hard code your solution? It would be very helpful for me (I''m not an expert coder..). Anyway, thank you so much for your help.


你能告诉我你的尝试吗?
Can you show me what you tried?


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

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