btw better than buy book is to ask here
Not really. We can't (and won't) solve every basic C++ problem, especially since this is a SFML forum and not a C++ forum. You have to show individual initiative, and that includes at least coming up with a minimal complete example, as stated by the
forum rules.
If you want to learn C++ seriously, you
must read a good book, there's no way around it. Of course you can learn it halfway through internet tutorials, but you don't do yourself a favor, you'll only waste a lot of time with unnecessary trouble. Furthermore, you could look for a forum that is focused on C++ programming rather than the SFML library.