Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 2nd, 2006, 09:38 PM
daniel_g daniel_g is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 60 daniel_g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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?

Reply With Quote
  #2  
Old October 2nd, 2006, 09:46 PM
daniel_g daniel_g is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 60 daniel_g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 3 m 50 sec
Reputation Power: 3
Well, I think the answer struck me as I was writting this post, right when I saw "Get()".
Does anyone know if howmany<rows[i].Get() is a good approach? So far the code seems to compile fine, still need to test it.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Cannot get value out of array


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT