J
jason.v2
Hey guys,
This is my first time using this so I guess we'll see how this goes.
I have a text file, input.txt that is a block of character that looks
something like this:
A S D F G H I
T Y E W F H E
P K L O F V B
What I'm trying to do is something like this:
Grid G = null;
BufferedReader input = null;
try{
input = new BufferedReader(new FileReader("input.txt"));
String line;
int counter = 0;
char[] tmp = new char[20];}
while((line = input.readLine()) != null){
counter++;}
for(int i=0; i<=G.getRow(); i++)
{
for(int j=0; j<=G.getCol(); j++)
{
input.read(tmp[], 0, 1);
}
}
}
There is a catch block after this to catch IO exception and File Not
Found Exception. I'm not sure how to take the characters from input.txt
and put them into the Grid, G.
I would really appreciate any help you guys might have....
Thanks!
-Jason.
This is my first time using this so I guess we'll see how this goes.
I have a text file, input.txt that is a block of character that looks
something like this:
A S D F G H I
T Y E W F H E
P K L O F V B
What I'm trying to do is something like this:
Grid G = null;
BufferedReader input = null;
try{
input = new BufferedReader(new FileReader("input.txt"));
String line;
int counter = 0;
char[] tmp = new char[20];}
while((line = input.readLine()) != null){
counter++;}
for(int i=0; i<=G.getRow(); i++)
{
for(int j=0; j<=G.getCol(); j++)
{
input.read(tmp[], 0, 1);
}
}
}
There is a catch block after this to catch IO exception and File Not
Found Exception. I'm not sure how to take the characters from input.txt
and put them into the Grid, G.
I would really appreciate any help you guys might have....
Thanks!
-Jason.