I gang

Need a small 10 minute C++ project finished

//=====================================================================

// PROGRAM DESCRIPTION

// 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.

//

// INPUTS:

//

//

// OUTPUTS:

//

//=====================================================================

// INCLUDE FILES

#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

//

//=====================================================================

// CONSTANT DEFINITIONS

// None

//

//=====================================================================

// GLOBAL CONSTANTS AND/OR OBJECTS

//

// None

//=====================================================================

//*******************************************************************************

// BEGINNING OF PROGRAM CODE

//*******************************************************************************

// 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);

if(!InOutFile)

{

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

return;

}

[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

Færdigheder: C++ Programmering

Se mere: strings programming, strings standard, string cplusplus, programming definitions, first lab, programming strings, programming input output, programming continue, cplusplus strings, cplusplus string, continue line, contents minute writing, beginning programming, series programming, programming objective, objective programming, objective code, writing lab, decrypted, c project, c objective, project input output, approach minute, open input file, objective encrypt file

Om arbejdsgiveren:
( 3 bedømmelser ) Colorado Springs, United States

Projekt-ID: #4065275

Tildelt til:

billinhit

Let me complete your project

$10 USD / time
(7 bedømmelser)
3.4