When will people learn not to ask source codes and work their way through...
'SOMEONE' tried to do this and got heavily disrespected.
Besides coding isnt heaven. You'll need to learn the basics, syntax and way of use first which is a pretty long road (again unless you copypaste everything).
Watch Jorndel's tutorials and thats your start.
Strongly advised NOT to start programming in C++ if you never had any experience before.