Gets the number of vertices from the input If n <= MAX_VERTICES, fills m with data from file; otherwise signals failure on stream is and sets m size to 0 x 0
What will be an ideal response?
```
istream& operator>> ( istream& is, Digraph& d )
{
int i, j;
is >> d.n;
if (is.fail()) {
d.n = 0;
} else if (d.n > MAX_VERTICES) {
is.setstate( ios::failbit );
d.n = 0;
} else {
for (d.numEdges = 0;
d.numEdges < MAX_EDGES && !is.fail();
++d.numEdges)
is >> d.edges[d.numEdges][0] >> d.edges[d.numEdges][1];
--d.numEdges; // adjust numEdges
if (!is.eof()) {
d.n = 0;
}
}
return is;
}
```
You might also like to view...
Match the following terms to their meanings:
I. WordArt II. SmartArt graphic III. Shapes IV. Text box A. lines, arrows, stars, banners, ovals, rectangles B. a gallery of text styles C. an object that can be used to place text anywhere on the slide D. can be used to illustrate processes, cycles, lists, and relationships
If a class declares constructors, the compiler will not create a(n) ____________.
Fill in the blank(s) with the appropriate word(s).