| Author |
need help to read the contents from a text file and store in a list
|
Shree Chinnu
Greenhorn
Joined: Jan 16, 2010
Posts: 7
|
|
Hi I have a problem in my code
I have to read a text file of this format
int num_thread => Total number of threads in the file
for (i = 0; i < num_thread; i++)
{
int num_message_i => Total number of messages of the next thread i
int => Total number of reference to the next thread i
for (j = 0; j < num_message_i; j++)
{
String => Author of the message
Double => Age (Posting Time) of the message
String => Title of the message
String => Contents of the message
}
}
The code I have written is as follows
But when I am trying to retrieve the data from the threadList
Only the Last message data is printed threadList.size() times.
Kindly let me know what might be the reason for this
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
|
edit your post to use code tag . use *code tag* while you are posting code
|
 |
 |
|
|
subject: need help to read the contents from a text file and store in a list
|
|
|