Hi all, I need to read a text file (I've attached it, you can take a look), and then store all the numbers in it into a 2D array. After which, I need to parse it. I need urgent help here! ):
Sunshineserene 0 Junior Poster
Recommended Answers
Jump to PostOkay, what code have you got so far?
Jump to PostWithout your code it's difficult to help you, but just looking at the way you're doing it, is there any reason why you're reading, storing it, parsing, and presumably storing the parsed values in some other array as opposed to parsing it immediately after reading?
Jump to Post1. This thread is solved, so if you have a major issue, please start a new one.
2. Could you please post your code? Assuming 'myDouble' is the name of your 2D array, it should look something like this:
…public double[][] getMyDouble() { return myDouble; }
Jump to PostLine 87 you have the same loop, and you are not changing the indexing. Please correct all the stuff that we have talked about in the other code first.
Jump to PostYour matrix is 1000*1000, and you don't want to print all of the values, and you don't want to change the size of the matrix. My suggestion is to save the values of x and y that you use when inserting the values into the matrix, and use them when …
All 49 Replies
leiger 14 Junior Poster in Training

coil
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
Sunshineserene 0 Junior Poster

coil
Sunshineserene 0 Junior Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
apines 116 Practically a Master Poster Featured Poster
Sunshineserene 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.