Hello,
I am trying to make a small application that will allow me to input a username to populate fields in a file I am creating. The problem that I am having is that the program loops as designed, but does not store more then the last name for the file (in this case it will always be "quit"). I am guessing I need to use an array or vector for the string userName...but am not sure how to go about this. My code is below. Can anyone give me a hint or tip to push me in the right direction? Any help is appreciated, and thank in advance!
Thank you jsmith, but that did not seem to solve the problem. When I move the myfile.open() outside the do loop, I ge t the same result. My csv file only has one entry, which looks something like this:
Thanks jfolk. While that does capture all of the information I am inputting, it does it all on one line. I need to have the information line after line. If I can figure out how to add a carriage return after each item, this may work. Although I have not been able to figure this out yet with an open file? I am still trying and testing...