Purchase Solution

A C++ program that shows how to read files

Not what you're looking for?

Ask Custom Question

See the attached file.
Assist with writing ideas a program that uses the attached data file as input and does simple data encryption. Replace each letter of the alphabet with the next letter. For example, a will be replace by b and b will be replaced by c. The letter z will be replaced by a. Numbers, spaces, punctuation and special characters stay the same. The sentence: "I am 21 yrs. old!", translates to J bn 21 zst. ome! Print out the input and print out the encrypted sentence.

Please do this the easiest way possible, I am learning C++ by myself but I just don't understand input/output so this will help me understand it better.

The contents of the data file are:

Roses are red
Violets are blue
I am still 21 years old!
The quick brown fox
Jumps over the lazy dog.

Attachments
Purchase this Solution

Solution Summary

This solution provides a simple but complete C++ program that reads a file and do some simple string processing on the data from that file.

Solution Preview

This solution shows how to read characters from a file, do some basic processing, and output the characters. When processing data from a file there are always three steps 1) open the file, 2) process the data in the file, 3) close the file. This is exactly ...

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

C# variables and classes

This quiz contains questions about C# classes and variables.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Networking Questions

This quiz consists of some basic networking questions.