some basic cpp snippets of learning