Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 5th, 2006, 3:09 PM   #11
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Nothing seems amiss in the source. Maybe it's got something to do with an invalid input? Is it a compiler error or a runtime error? Could you give us a stacktrace of the error?
Arevos is offline   Reply With Quote
Old Nov 5th, 2006, 4:01 PM   #12
deanosrs
Programmer
 
deanosrs's Avatar
 
Join Date: Apr 2006
Location: Bristol, UK
Posts: 31
Rep Power: 0 deanosrs is on a distinguished road
Send a message via MSN to deanosrs
It's a compiler error. Don't know how to get a stack trace but will research and post one when I work it out...
deanosrs is offline   Reply With Quote
Old Nov 5th, 2006, 7:31 PM   #13
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 935
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Quote:
Originally Posted by deanosrs View Post
It's a compiler error. Don't know how to get a stack trace but will research and post one when I work it out...
try {
    ...
} catch (Exception e) { 
    e.printStackTrace();
}
titaniumdecoy is offline   Reply With Quote
Old Nov 5th, 2006, 7:46 PM   #14
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by deanosrs View Post
It's a compiler error. Don't know how to get a stack trace but will research and post one when I work it out...
Stack traces of errors (as titaniumdecoy demonstrates nicely) are just for runtime errors. Perhaps you could give us a description of the compile time error?
Arevos is offline   Reply With Quote
Old Nov 6th, 2006, 6:52 AM   #15
deanosrs
Programmer
 
deanosrs's Avatar
 
Join Date: Apr 2006
Location: Bristol, UK
Posts: 31
Rep Power: 0 deanosrs is on a distinguished road
Send a message via MSN to deanosrs
The compiler error says:

Unchecked call to add(E) as a member of the raw type java.util.ArrayList
          graph[src - 1].add(addthis);
deanosrs is offline   Reply With Quote
Old Nov 6th, 2006, 10:41 AM   #16
deanosrs
Programmer
 
deanosrs's Avatar
 
Join Date: Apr 2006
Location: Bristol, UK
Posts: 31
Rep Power: 0 deanosrs is on a distinguished road
Send a message via MSN to deanosrs
the source code is above, still stuck with this...

I think I'm closer to understanding it though. Basically I want an array of ArrayLists, each of which needs to contain an "Edge" (my class). It needs to be so that the arraylists can only contain edges otherwise it whinges at me when I try to add an edge to it. However when I put <Edge> in the initial array definition it creates an error of generic array creation - that I'm trying to create an array of more than one type, which is wrong I want an array of ArrayLists but I want each of them to only contain edges!

I think this is the culprit line...

ArrayList[] graph = new ArrayList[nodeno];

Last edited by deanosrs; Nov 6th, 2006 at 10:59 AM.
deanosrs is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
array of listed lists ELHEK Java 3 Sep 27th, 2006 5:19 PM
Assigning an array of lists deanosrs C 42 Apr 13th, 2006 2:35 PM
changing size of an array Eric the Red Java 3 Apr 3rd, 2006 9:19 PM
Changing Array structures to Linked Lists? kalulu C 4 Nov 29th, 2005 7:33 AM
Installing IPB 2.03 bh4575 Other Web Development Languages 0 Apr 23rd, 2005 3:36 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:42 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC