How to read in a text file with commas and write it out to a new file without commas?
The file has nine columns- 1st is month next is date and there is a comma, then year then there are 6 columns of numbers representing dollars with a comma in between them for example 17,751.24
I need to make a new text file out of it that has no commas.
I was trying to use double variables for each coloumn but the commas forced me to use string variables then i tried to read it in with a while loop:
While(infile >> month >> date >> year >> open >> high >> low >> close >> volume >> adj)
{
...
}
Side note : the file is about some stock exchange thing.
How do I make a new text file with the same content except there should be no commas.
This is for a beginners c++ class so please avoid using advanced stuff in answers.
Thanks in advance.