subject
Engineering, 30.11.2019 00:31 milkshakegrande101

Code the errorhandler function and process the errors in the following code. use the following 2 txt files to for the code. make sure you use standard error (cerr) to output error messages. don’t forget the #include directive for that. this output is only performed in the errorhandler function. pass the function the amount, the status, and an informative message (be creative). in the program, look for the comments place error handling here. this is where you will want to interface with (call) the error handler. to simplify this we will use string literals for messages, and numeric literal for status as the arguments for the function call. for input data, the item in error, we will pass either the bad data (amount) or the file name experiencing a problem. there are seven calls to the interface. in the error handling function, replace "your code here" with all of the logic to process the incoming errors. consider possible ways to gracefully terminate (do not use exit).

if the status is one (1) then the function should resume processing after displaying the message. if the status is two (2) then the function should interrupt the program. considerations for interrupting the program should include closing the files properly, so you will need to figure out how to leave the program gracefully. don’t use exit.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Water at the rate of 1 kg/s is forced through a tube with a 2.5 cm inner diameter. the inlet water temperature is 15°c, and the outlet water temperature is 50°c. the tube wall temperature is 14°c higher than the local water temperature all along the length of the tube. what is the length of the tube?
Answers: 3
question
Engineering, 04.07.2019 18:20
Ahe-xe mixture containing a 0.75 mole fraction of helium is used for cooling electronics in an avionics application. at a temperature of 300 k and atmospheric pressure, calculate the mass fraction of helium and the mass density, molar concentration and molecular weight of the mixture. if the cooling capacity is 10 l, what is the mass of the coolant?
Answers: 3
question
Engineering, 04.07.2019 18:20
Amixture of slurry and mud is to be pumped through a horizontal pipe of diameter 500 mm. the fluid behaves as a bingham plastic with a yield stress of 30 pa and viscosity 0.04 pa.s. describe the effects of the shear stress through a transverse section of the pipe by plotting the variation in shear stress and velocity profile: (i) just before the slurry starts to move (ii) as the slurry flows when the pressure gradient is double that in part (i)
Answers: 3
question
Engineering, 04.07.2019 19:10
Agas is compressed from vi 0.3 m, p 1 bar to of v2 0.1 m3, p2--3 bar. pressure and volume are related linearly during the process. for the gas, find the work, in kj.
Answers: 2
You know the right answer?
Code the errorhandler function and process the errors in the following code. use the following 2 txt...
Questions
question
Mathematics, 29.04.2021 08:40
question
Mathematics, 29.04.2021 08:40
question
Mathematics, 29.04.2021 08:40
question
History, 29.04.2021 08:40
Questions on the website: 13722359