Purchase Solution

C++ char array program

Not what you're looking for?

Ask Custom Question

Please help with the following problem.

I'm having trouble with a program that is supposed to search message.txt and print out the message. i will upload instructions. We must use functions, and we were not instructed on how to search char arrays for this purpose and I am lost. Your help would be greatly appreciated!

Enter message file: Enter real message file: $Zqva'HMQ[V$L01$Y56On the twelfth day of Christmas my true love gave to mexNt}h0{YS/L$X66The 1997 Chautauqua Program has bee

Purchase this Solution

Solution Summary

This solution first reviews some basic techniques to process text file, and give a rough idea of the algorithm. It also provides the source code for this problem (compiled and verified on gcc). The source codes are well commented and contains more detailed explanation on this program.

Solution Preview

Please refer to the code for more details. The code is tested using g++ under Cygwin. Here are a few comments on this problem:

1. You may use infile.get() to get a single char at a time. Or infile.get(charArray,n) to read the next n-1 chars to the array (with ? by the end).

2. Since you ...

Purchase this Solution


Free BrainMass Quizzes
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 Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic Networking Questions

This quiz consists of some basic networking questions.

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.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.