1. It's a lot faster for other people here if you paste your code directly into your posting instead of making us wait for a large picture to download. To keep the code formatted properly, enclose it in [ CODE ] and [ /CODE ] tags (remove the spaces that I added between the brackets).
2. It helps a lot if you tell us what compiler error messages you got, and what line they refer to.
I may be off here, but it appears that those first three lines are supposed to be comments but aren't being treated as such. If you notice the words 'buffer' 'is' and 'for' are all syntax highlighted. Also the text between the single quotes in don't and file's is highlighted as if it were a string constant.
I recommend changing those double semicolons to double slashes like the rest of the comments.
Yeah it seems you have written it in the Emacs *scratch* buffer and then saved it to file, remove the first 3 lines. Then try to compile with the command already written here.
i don't know if this will help your problem at all but I am also new to c++ and i have just gotten in the habit of including: "#include <cstdlib>" ; and "using namespace std". in all of my programs
@ Bad
He's writing in C, not C++
But aside from that, namespace std - in the future you should consider only import those that actually needed.
But at the moment it's okay.