|
-
November 24th, 2006, 10:13 AM
#1
Count elements within bounds in 2D array
Hi,
I'm trying to count the number of elements that contain numbers that lie within two boundry conditions in a 2D array.
So, if I have my data:
i j
10 100
20 200
30 300
40 400
I want to know how many rows (20<=i<=40 && 100<=j<=300). In this case 2. The arrays are also many lines long.
I thought that this would be really easy to do in a language that seems as powerfula nd flexible as C++ but......
Any ideas. Cheers.
Will
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|