Here's an altered version, using two stacks, pretty much just like Dmytry's. (You could easily get rid of one of the nearly identical loops by having pointers to the two stacks, pSrcStack and pDestStack, and just swap them at the end of the loop.)
Push the initial true face onto Stack1.Stack2 starts off empty.While Stack1 is not empty Or Stack2 is not empty While Stack1 is not empty Pop a single face off of the top of Stack1. For each edge of that face, find the connected face. If the connected face is false Set that face to true. Push that face onto Stack2. End If End For End While While Stack2 is not empty Pop a single face off of the top of Stack2. For each edge of that face, find the connected face. If the connected face is false Set that face to true. Push that face onto Stack1. End If End For End WhileEnd While