Showing posts with label getline. Show all posts
Showing posts with label getline. Show all posts

Thursday, March 7, 2013

Comma Adder

In a similar fashion to my 2 previous tutorials:

http://thecodingtutorials.blogspot.com/2013/01/simple-file-manipulation-in-console.html
http://thecodingtutorials.blogspot.com/2013/01/character-arrays-in-c.html

This tutorial will show a C++ program that takes input from a file called "input.txt" and outputs it to "output.txt", only this time, it will take input like this:

1234567
1234567
1234567

and output it with commas after the third digit on each line like this:

123,4567
123,4567
123,4567