Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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") << "	";
            out << endl;
        }
        return out;
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #load #oprator #print #variable #clas
ADD COMMENT
Topic
Name
9+9 =