some code practise in c++