Loop to print the distance of every node from source vertex
for ( int i = 0 ; i < dist . size ( ) ; i ++ ) { if ( dist [ i ] == infi ) { cout << i << " ▁ and ▁ " << s << " ▁ are ▁ not ▁ connected " << endl ; continue ; } cout << " Distance ▁ of ▁ " << i << " th ▁ vertex ▁ from ▁ source ▁ vertex ▁ " << s << " ▁ is : ▁ " << dist [ i ] << endl ; } return 0 ; }