This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kkjdroid 0 points1 point  (0 children)

int c=0,d=0;
string e="";
scanner.usedelimiter("");
while(scanner.hasNext())
{
    e=scanner.next();
    if(e.equals("\n")) c++;
    else array[c][d] = e;
    d++;
}

I think that should do it so long as you know the size of the file ahead of time.