• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

writing in and appending to a file

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My input file includes data from both males and females. My code below replaces a 'male string' with the key and values and writes into an existing file for 'male'. How can I do the same for females and write into a different 'female string' in the same program?

I am new to this, Sorry If I am confusing you!!! But I want something like

"going through my input----if it is a 'male', replace the 'male string' with corresponding key and values-------else if a 'female', replace the 'female string' with corresponding key and values". Thank You.


 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try and break your code down line by line to figure out what is happening. If you do that it shouldn't take you very long to figure out how to do what you need to do, everything is in the code your teacher gave you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic