bartleby

Videos

Expert Solution & Answer
Book Icon
Chapter 12, Problem 70RQE

Explanation of Solution

Syntax error:

An error which occurred on the source code of a program is referred as "syntax error"; because the computer programs strictly follows the syntax rules, if the code fails to prove its language syntax format then the compiler will throw an error.

Purpose of the given code:

The purpose of the given code is to open the file "info.dat" using "fstream" file stream object, and write the string value in the specified file.

List of errors present in the given code:

The code that is given contains some of the syntax error and it is listed as follows:

Error 1:

  • The file open statement is an error in the given code.
  • In C++, files can be opened using file stream object definition. In definition, the open statement contains two arguments such as file name and file access mode.
  • The format for including the file access mode in file open statement as follow as:
    • ios::in
  • The scope resolution operator "::" is missing in the given file open statement.

Therefore the given file open statement can be modified as:

fstream dataFile("info.dat", ios::in);

Error 2:

  • String values cannot be used in "put" function...

Blurred answer
Students have asked these similar questions
You are tasked with developing a portable system that can be worn to collect health and fitness data. The challenge is to integrate all functions into the smaller form of an ear clip. The device should include heart rate, movement and temperature sensor and wireless communication with a mobile app. Draw a diagram- hardware architecture of the system- including the selection of suitable sensors, communication modules, and an energy-efficient microcontroller. (visualize the components and their connections)
Draw out an example of 3 systems using Lamport’s logical clock and explain the steps in words.
"Systems have become very powerful and sophisticated, providing quality information fordecisions that enable the firm to coordinate both internally and externally."With reference to the above statement compare the operations of any three data gatheringsystems today’s organisations use to aid decision making.

Chapter 12 Solutions

Starting Out with C++ from Control Structures to Objects (9th Edition)

Chapter 12.10, Problem 12.11CP Chapter 12.10, Problem 12.12CP Chapter 12.10, Problem 12.13CP Chapter 12.10, Problem 12.14CP Chapter 12.10, Problem 12.15CP Chapter 12, Problem 1RQE Chapter 12, Problem 2RQE Chapter 12, Problem 3RQE Chapter 12, Problem 4RQE Chapter 12, Problem 5RQE Chapter 12, Problem 6RQE Chapter 12, Problem 7RQE Chapter 12, Problem 8RQE Chapter 12, Problem 9RQE Chapter 12, Problem 10RQE Chapter 12, Problem 11RQE Chapter 12, Problem 12RQE Chapter 12, Problem 13RQE Chapter 12, Problem 14RQE Chapter 12, Problem 15RQE Chapter 12, Problem 16RQE Chapter 12, Problem 17RQE Chapter 12, Problem 18RQE Chapter 12, Problem 19RQE Chapter 12, Problem 20RQE Chapter 12, Problem 21RQE Chapter 12, Problem 22RQE Chapter 12, Problem 23RQE Chapter 12, Problem 24RQE Chapter 12, Problem 25RQE Chapter 12, Problem 26RQE Chapter 12, Problem 27RQE Chapter 12, Problem 28RQE Chapter 12, Problem 29RQE Chapter 12, Problem 30RQE Chapter 12, Problem 31RQE Chapter 12, Problem 32RQE Chapter 12, Problem 33RQE Chapter 12, Problem 34RQE Chapter 12, Problem 35RQE Chapter 12, Problem 36RQE Chapter 12, Problem 37RQE Chapter 12, Problem 38RQE Chapter 12, Problem 39RQE Chapter 12, Problem 40RQE Chapter 12, Problem 41RQE Chapter 12, Problem 42RQE Chapter 12, Problem 43RQE Chapter 12, Problem 44RQE Chapter 12, Problem 45RQE Chapter 12, Problem 46RQE Chapter 12, Problem 47RQE Chapter 12, Problem 48RQE Chapter 12, Problem 49RQE Chapter 12, Problem 50RQE Chapter 12, Problem 51RQE Chapter 12, Problem 52RQE Chapter 12, Problem 53RQE Chapter 12, Problem 54RQE Chapter 12, Problem 55RQE Chapter 12, Problem 56RQE Chapter 12, Problem 57RQE Chapter 12, Problem 58RQE Chapter 12, Problem 59RQE Chapter 12, Problem 60RQE Chapter 12, Problem 61RQE Chapter 12, Problem 62RQE Chapter 12, Problem 63RQE Chapter 12, Problem 64RQE Chapter 12, Problem 65RQE Chapter 12, Problem 66RQE Chapter 12, Problem 67RQE Chapter 12, Problem 68RQE Chapter 12, Problem 69RQE Chapter 12, Problem 70RQE Chapter 12, Problem 71RQE Chapter 12, Problem 72RQE Chapter 12, Problem 1PC Chapter 12, Problem 2PC Chapter 12, Problem 3PC Chapter 12, Problem 4PC Chapter 12, Problem 5PC Chapter 12, Problem 6PC Chapter 12, Problem 7PC Chapter 12, Problem 8PC Chapter 12, Problem 9PC Chapter 12, Problem 10PC Chapter 12, Problem 11PC Chapter 12, Problem 12PC Chapter 12, Problem 13PC Chapter 12, Problem 14PC Chapter 12, Problem 15PC Chapter 12, Problem 16PC

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
The hole made on a contour band sawing machine.

Degarmo's Materials And Processes In Manufacturing

Algorithm to create a "List" that instantiates an "ArrayList": Step 1: Create a list using the keyword "List" o...

Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)

Misclosure and correction that would be applied to each angle in balancing them.

Elementary Surveying: An Introduction To Geomatics (15th Edition)

Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    SEE MORE QUESTIONS
    Recommended textbooks for you
    Text book image
    Systems Architecture
    Computer Science
    ISBN:9781305080195
    Author:Stephen D. Burd
    Publisher:Cengage Learning
    Text book image
    Programming Logic & Design Comprehensive
    Computer Science
    ISBN:9781337669405
    Author:FARRELL
    Publisher:Cengage
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781305480537
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    Programming with Microsoft Visual Basic 2017
    Computer Science
    ISBN:9781337102124
    Author:Diane Zak
    Publisher:Cengage Learning
    C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k; License: Standard YouTube License, CC-BY
    file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA; License: Standard Youtube License