I would like to know how can I insert a parameter in a std::basic_ostream I've been trying but I can't
I need to insert a parameter to select which values from arista I want to print Once I have the parameter inserted the next step is easy because it is just an if condition
template <typename charT>
friend std::basic_ostream<charT> &operator << (
std::basic_ostream<charT>& out, Familia &familia
) {
out << "\t Relaciones\n";
for (Vertice<cedula, relacion> &vertice : familia) {
int per = vertice.getFuente();
for (Arista<cedula, relacion> &arista : vertice) {
out << per << "->";
out << arista.getDestino() << " es" << " " << arista.getValor() << "\n";
}
}
return out;
}