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, AdjacencyMatrix& m )
{
int i, j;

is >> m.n >> m.n;
if (is.fail()) {
m.n = 0;
} else if (m.n > MAX_VERTICES) {
is.setstate( ios::failbit );
m.n = 0;
} else {
for (i = 0; i < m.n; ++i)
for (j = 0; j < m.n; ++j)
is >> m.mat[i][j];
if (is.fail()) {
m.n = 0;
}
}
return is;
}

```

Computer Science & Information Technology

You might also like to view...

Which of the following statements is not valid C++ code?

a. int ptr = &num1; b. int ptr = int *num1; c. float num1 = &ptr2; d. All of these are valid e. All of these are invalid

Computer Science & Information Technology

________ are similar to outline levels and are identified by bullet size, indentation, and text size

Fill in the blank(s) with correct word

Computer Science & Information Technology

Once a column adjacent to a table becomes a calculated column, it also becomes part of the table

Indicate whether the statement is true or false.

Computer Science & Information Technology

When you use the Query Browser to create a query, you must enter a semi-colon at the end of the command.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology