modify somme snippets under c++