Need a small 10 minute C++ project finished



// Objective - The objective of this lab assignment is to give you a

// chance to use some of the C++ text file I/O facilities.


// Specifications - In this lab you will open a text file for writing

// and then interactively enter a series of strings which will be written

// to the file. Before each string is written to the file, it will be

// encrypted so that if you were to look at the text saved in the file

// it would be meaningless. After all strings are written to the file

// you will close it. You will next reopen the file for input and display

// each string of the fileís contents to the screen, first in its encrypted

// form and then, after decrypting the string, displaying it in its original

// form. One approach for doing this is to read in a string from the file,

// display it in its encrypted form, decrypt it, and finally display it in

// its original (decrypted) form. Repeat this process for all strings until

// the end-of-file mark is detected.









#include // for cin/cout

#include // for assert

#include // for string

#include "main.h" // for classes

using namespace std; // Make entities in std namespace explicitly visible




// None





// None





// Declare required local variables and objects

void main()


string FileName;

string TextLine;

ifstream InFile;

cout << "Enter the name of your file: ";

getline(cin, FileName);

cout << "The filename you entered is: " << FileName <in_avail(), '\n');

[url removed, login to view](FileName);



cout << "\nOpen of file " << FileName << "for input/output failed\n";



[url removed, login to view]();



// Interactively input file name from user

// Open file for output and check for successful open ñ exit if open fails

// While (user wants to continue entering text lines)

Input a text string from the keyboard

Encrypt the string (by calling Encrypt(Ö) function)

Send encrypted string to file followed by an end-of-line

Ask user if he/she wants to enter another string of text

Close file

Open file for input and check for successful open ñ exit if open fails

Input first text string from file

While(end-of-file not encountered on file)

Display string (encrypted) on standard output file (cout)

Decrypt the string (by calling Decrypt(Ö) function)

Display string (now decrypted) on cout

Input next text string from file

Close file

Kemahiran: Pengaturcaraan C++

Lihat lagi: strings in c programming, strings for c standard, string cplusplus, programming in objective c, programming definitions, objective of c programming, objective c project, first lab, c programming strings, c programming input output, c programming continue, c programming classes, cplusplus strings, cplusplus string, continue line in c, contents in minute writing, c# beginning, beginning programming, beginning c programming, assert c programming, series programming in c, programming objective c, objective c programming, objective c code, writing lab

Tentang Majikan:
( 3 ulasan ) Colorado Springs, United States

ID Projek: #4065275

Dianugerahkan kepada:


Let me complete your project

$10 USD / jam
(7 Ulasan)