update code segment with ```cpp mark

Also add "since" and "language" at the beginning.