istream& operator>>(istream& in, Time& a) { int hours, minutes; char separator; in >> hours; in.get(separator); // Read : character in >> minutes; Time(hours, minutes); } return in;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please explain what the following code snippet does.
istream& operator>>(istream& in, Time& a)
{
int hours, minutes;
char separator;
in >> hours;
in.get(separator); // Read : character
in >> minutes;
a = Time(hours, minutes);
return in;
}
Transcribed Image Text:Please explain what the following code snippet does. istream& operator>>(istream& in, Time& a) { int hours, minutes; char separator; in >> hours; in.get(separator); // Read : character in >> minutes; a = Time(hours, minutes); return in; }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Keywords
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education

Expert Answers to Latest Homework Questions

Q: 1- An introduction and a conclusion.   2-  A critical discussion on the concept of what is an offer,…
Q: Analyse the treaty's applicability to Jamaica by citing pertinent instances, such as cases, and…
Q: A 2-year-old boy is brought by his parents to the urgent care clinic because of bright red blood…
Q: Discuss, with the aid of diagrams, the principles of operation of gas turbine plants.
Q: Explain, with the aid of diagrams, the principles of operation of steam turbine plants.
Q: help please answer in text form with proper workings and explanation for each and every part and…
Q: Evaluate the modifications made to the basic Rankine cycle to improve the overall efficiency of…
Q: Task 3 A system has 5 processes and 5 types of resources. The current state of the system is as…
Q: Justify why the Rankine cycle is preferred over the Carnot cycle in steam production plants…
Q: A 26-year-old woman and her husband present to a fertility specialist.  They have been trying to…
Q: A 4-year-old boy is brought to the pediatrician because of chronic constipation and poor weight…
Q: An industrial organization has established an automated assembly line (for $360,000) that will…
Q: A 3-year-old girl is referred to the pediatric cardiologist because of pulmonary congestion and a…
Q: At w = 1 rad/s, obtain the input admittance in the given circuit where R= 9Q. Vin R ww 202 ww 2 H 1…
Q: A 29-year-old primigravid woman present for a routine antenatal check.  Ultrasound evaluation…
Q: Ignore the solutions I have done and re do everythinhg (the whole table)
Q: Coffee Bean Incorporated (CBI) processes and distributes high-quality coffee. CBI buys coffee beans…
Q: According with this exercise, yesterday I'd received answer by a expert, but accounting entry was…
Q: Required Information [The following Information applies to the questions displayed below.] Miami…
Q: Wanda B. Rich is the CEO of Outlet Flooring, a discount provider of carpet, tile, wood, and laminate…
Q: Answer the questions in the table about each labeled atom in the molecule below. 00 b a C Atom What…