Answers for "c++ over load oprator to print variable of clas"

C++
0

c++ over load oprator to print variable of clas

ostream& operator<< (ostream& out, graph g) {
        for (int i = 0; i < g.size; ++i) {
            for (int j = 0; j < g.size; ++j) 
                out << (g.grph[i][j] ? "true" : "false") << "\t";
            out << endl;
        }
        return out;
    }
Posted by: Guest on June-28-2020

Browse Popular Code Answers by Language