Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help on computer science, to write c++ program(Visual Studio) please!!! 1 Purpose This is another program for reading from files. In this program we

Need help on computer science, to write c++ program(Visual Studio) please!!!

image text in transcribed

image text in transcribed

image text in transcribed

1 Purpose This is another program for reading from files. In this program we will read blocks of data from a (well-formatted) file that you will be given and make some computations on that data The input file will be formatted as described later in this document. It will be similar the "block" data from Lecture 11. 2 Procedure You will create one source code program. Prog06.cpp. This program will 1. Prompt the user for an input filename. Store the filename as a string object. See Lectures 10 and 11. Then prompt the user for an output filename. Store it the same way 2. open the input filename for reading. Open the output filename for writing with append. If you cannot open the filenames the user supplied, prompt the user for two more. Repeat this until you can open the user's files. I found that if you want to use just the plain file name, the file should be placed the directory where Visual Studio puts the vcxproj" file and the cpp" file. Otherwise you have to give the FULL path to the file. If you put the file on the Desktop, the filename will be something e like C: Musers your user name Desktoplyour real-file name 3. Once the file is open, read in blocks of data until one of two things happens You reach the end of the file. The block you read in has an ID number of 0 1 Purpose This is another program for reading from files. In this program we will read blocks of data from a (well-formatted) file that you will be given and make some computations on that data The input file will be formatted as described later in this document. It will be similar the "block" data from Lecture 11. 2 Procedure You will create one source code program. Prog06.cpp. This program will 1. Prompt the user for an input filename. Store the filename as a string object. See Lectures 10 and 11. Then prompt the user for an output filename. Store it the same way 2. open the input filename for reading. Open the output filename for writing with append. If you cannot open the filenames the user supplied, prompt the user for two more. Repeat this until you can open the user's files. I found that if you want to use just the plain file name, the file should be placed the directory where Visual Studio puts the vcxproj" file and the cpp" file. Otherwise you have to give the FULL path to the file. If you put the file on the Desktop, the filename will be something e like C: Musers your user name Desktoplyour real-file name 3. Once the file is open, read in blocks of data until one of two things happens You reach the end of the file. The block you read in has an ID number of 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

ISBN: 0121016250, 978-0121016258

More Books

Students also viewed these Databases questions