Changes in subgraphs and subnetworks examples.

I have changed subgraphs and subnetworks examples and the corresponding
algorithms in snap-adv/.

The code compiles with msvc and gcc under cygwin.
Let me know if there are any more compilation problems.