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
*** View this blog with HTTP instead of HTTPS to see the code formatted nicely. ***
Showing posts with label program. Show all posts
Showing posts with label program. Show all posts
Thursday, March 7, 2013
Wednesday, January 16, 2013
Simple File Manipulation in a Console Application with C++
1234567
1234567
1234567
and output it to a file called "output.txt" that is formatted like this (standard CSV (Comma Separated Values) format, except with 25 columns per row maximum):
1234567,1234567,1234567,...(25 times)
1234567,1234567,1234567,...(25 times)
1234567,1234567,1234567,...(18 times)
Tuesday, March 27, 2012
Setting up and using FTP
FTP, or File Transfer Protocol, is a means of being able to transfer files from one computer to another. Usually FTP is used for transferring files to and from web servers. It is one of my favorite methods of uploading websites, scripts, files, and etc.
FTP uses a client and server program. The server program listens and waits for incoming client connections, and once a connection is established the two computers can communicate with each other and transfer files back and forth. A client program is needed to interact with the server (from a website designer/developer/manager's perspective) and upload/download files.
My favorite FTP client is FileZilla (note: FileZilla also provides a server program, but we're not going to be using that in this tutorial). It's free and it can do everything you would want to do with an FTP client - I've also never experienced any bugs or any other problems (that were not my own fault).
First, go to the FileZilla website to download the client program:
http://filezilla-project.org/
FTP uses a client and server program. The server program listens and waits for incoming client connections, and once a connection is established the two computers can communicate with each other and transfer files back and forth. A client program is needed to interact with the server (from a website designer/developer/manager's perspective) and upload/download files.
My favorite FTP client is FileZilla (note: FileZilla also provides a server program, but we're not going to be using that in this tutorial). It's free and it can do everything you would want to do with an FTP client - I've also never experienced any bugs or any other problems (that were not my own fault).
First, go to the FileZilla website to download the client program:
http://filezilla-project.org/
Subscribe to:
Posts (Atom)