2. If you have compiler errors / warnings then post them verbatim in full. Make sure the line numbers match up with the line numbers in the code you posted.
To add onto what TheIdeasMan said you could also have a look at some tutorial videos on YouTube, that's how I personally learned the basics of C++. The rest you just learn as you go along; at least that was the case for me, people learn in different ways and I can't learn very well by reading long written tutorials or textbooks unless it is set out very specifically for me which I find very few are. I learn through practice and actually seeing it being done by another person while they explain what they are doing.
I would recommend you look at the links TheIdeasMan suggested and to possibly look at some videos or a tutorial playlist on the internet on the basics of C++.