Isn't that a waste of memory and CPU?No, the overhead for an sf::Event object on the stack is absolutely negligible, even more since it's a POD (plain old data) type. Declaring variables as late and as local as possible is much more important, since it makes code more readable (one knows the scope of the variable) and avoids accidental accesses to a variable (before/after its usage). Such micro-optimizations usually lead to nothing as long as other parts of the code determine the performance, the phenomenon is also known as premature optimization.
By the way, it's probably a bad idea to begin with C++ and SFML at the same time, since SFML requires already solid knowledge of the programming language. And you will have a lot of questions like that if you don't know C++ well ;)Well I've already read http://www.cplusplus.com/doc/tutorial/ (http://www.cplusplus.com/doc/tutorial/) and understand everything (well except the template part). The only problem really is that I tend to forget it. And that's exactly why I'm trying to learn SFML: I eventually want to create a very simple 2d game with SFML, so I can use the knowledge I picked up by reading the cplusplus.com tutorial in a fun way. Which (hopefully) helps me at remembering the essential information. :)