• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't print found element from array  RSS feed

 
Emma Lucy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone PLEASE help! It's driving me round the bend. I have set up an array asking the user to enter the array value. There are several methods that all work well except one - find element in array.
I think it is finding the element, but I am unable to print the details of the found element, it prints the details of the last element added. The find method asks the user to enter the string value to be found in the array, returning either Found with the details printed or not found.
The methods that work let me add an element to the array, delete an element from the array & fills the gaps (which to add to the confusion uses the find method), and print all element details in array.
I can provide the code if anyone can help, but it is part of a large menu so didn't want to overload the question!
Any suggestions will be very gratefully received.
 
Villiam Hiyes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the Code
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And when posting the code, please post only the relevant parts, surrounded with the [code] and [/code] UBB tags.
 
Emma Lucy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here goes....this is the code that calls or is called by the problem method findPatient()...

[ April 09, 2004: Message edited by: Emma Lucy ]
[ April 09, 2004: Message edited by: Emma Lucy ]
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Emma Lucy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan - you are my hero!!!
That works beautifully. I've been bashing my head against that for about 2 whole days.
Thank you soooo much.
emma
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!