DFS with C++

IS MY DFS CODE ALRIGHT??? CAN anyone plzzzz check????????? will all the output be OK with my CODE??and one more question- is the forloop necessary here before these line??
{
if(color[2]==white)
dfsvisit(2,n_v);
}