如何将行与二维数组进行比较。 [英] How to compare rows into a 2D array.
本文介绍了如何将行与二维数组进行比较。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何比较一行与其他行以查看该行是否与2D数组匹配,如果有任何匹配,则显示它。这可能吗?例如:
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号
解决方案
此示例不是合法的C代码。它用什么语言编写?
你好donbock。
代码如下:
展开 | 选择 | Wrap | 行号
一次比较一行一列。一旦找到不匹配的列,就会知道行不同。在比较最后一列之前,你不知道行是否相同。
顺便说一句,你真的想比较第0行到第4行。
How to compare one row with the other ones to see if that row has a match into a 2D array and if there is any match, display it . It is this possible to do it? example:
Expand|Select|Wrap|Line Numbers解决方案This example is not legal C code. What language is it written in?
Hi donbock.
The code is this:
Expand|Select|Wrap|Line Numbers
Compare the rows to each other one column at a time. You know the rows are different as soon as you find a column that doesn''t match. You don''t know the rows are the same until after you have compared the last column.
By the way, you really want to compare row 0 to row 4.
这篇关于如何将行与二维数组进行比较。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆