
October 2nd, 2006, 09:38 PM
|
|
Contributing User
|
|
Join Date: Mar 2006
Posts: 60
Time spent in forums: 21 h 3 m 50 sec
Reputation Power: 3
|
|
|
Cannot get value out of array
Basically, I have 2 classes: Row and Board. Row only returns a different value everytime is called using a Get() method. Board gets those values and puts them in an array NumArr. From that array, I create another array: rows[t]
Code:
//...
int m = count+1;
if (m>MAX)
m = MAX;
else
m = m;
rows = new Row [m];
for(int t =0; t<count+1; ++t)
rows[t] = new Row(NumArr[t]);
//...
Later, on a boolean method, I want to check if a number is greater than the value of rows[]:
Code:
for(int i; i<n; ++i)
if (howmany < rows[i])
//do something here
else
//something else
I get the error that "operator < cannot be applied to nim.row"
I then tried using Integer.parseInt(rows[i]), but I get the error that parseInt(nim.row) symbol cannot be found.
Does anyone have an idea of what I'm doing wrong here?
|