1) C++ is not a scripting language.
2) You shouldn't do this in c++ since there are far better languages for those kinds of things.
3) You will need to learn at least the basics of programming (read books etc.) otherwise you will get very frustrated very soon because the code you c&p'ed doesn't work and you don't know why.
Although you may have heard that answer many times it's the only way to go!