Hi
Your algorithm looks fine - however you can optimize it by not reading the whole file into an array, but by reading line-by-line, doing the blank-to-comma-exchange on the current line, and then writing it to the output-file.
Regarding your "I want to know"-line I am puzzled: where exactly is your problem? In Text file opening problem you already asked on how to open a file. And in replace middle spaces and write to another file you asked on how to replace spaces by commas. Maybe you can illustrate your issues with code you have already written.
RataIn reply to Re: Replace spaces with commas and write to other file
by Ratazong
in thread Replace spaces with commas and write to other file
by sufi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |