I am trying to read data from a .txt doc line by line with delimiters. we also have to populate a vector with the info. I have tried everything I know to do, but no matter what I do it says "ERROR: Cannot open file". I saved the info into a new txt file and now my output is showing only the zipcodes of the people.Can someone please help me? I have been trying to do this for 3 days. all help is appreciated. here is my code.
and here is my txt file:
$Tommy$Gunn$22 Winchester Drive$Calamar$AL$38880
$Bobby$Smither$117 Drover Drive$Budville$NC$28711
$William$Hammet$45 East West Street$Springfield$NC$28881
$Shenna$North$10 Tenth Street$Canopener$AL$31110
$Robert$Stillskin$300 Square Circle$Picklestown$NC$27887
$Walter$Mellon$99 Main Street$Blueville$AL$33990
THANK YOU! I was confused there. How about if I want to get the first/last name on same line and city/state/zip on same line? so instead of it giving me 6 lines per address, only 3? and I won't even lie, populating a vector, no idea how to do that.