Do I cite introductory material in a subject that helped me indirectly? I am writing my undergrad Bachelor's thesis in computational physics where I do C++ programming. In some C++ books, I read some things that were quite useful during programming, but they do not have a direct connection to the physics.

Since I was proficient with LaTeX before I started the thesis, I do not see a point in adding anything about that in the references. That is rather a skill than specific facts, and I did not really read about it during my research.

Another thing are resources that I consult for an introduction into a topic when I do not understand something in a paper. After reading that introduction material, I often understand the paper to a sufficient extent. When I then write the text, I think I could get by by only referencing the paper since it contains virtually everything needed. But it also seems wrong to omit that I read introduction material.


Should I cite sources like the C++ book?
Should I cite introduction material like Wikipedia, websites or easy books?
You don't typically cite material that helps you understand a topic. You cite material that you explicitly use in a paper. So source books like a C++ book don't need to be cited unless you're using an unusual and explicit construction mentioned in one of those books. For example, there's a technique to draw a geometric object using GPUs that was first mentioned in an graphics programming textbook: people using the technique will cite that textbook. 

Wikipedia is not supposed to be a repository of original material, so if you found something on wikipedia then there's likely to be an original source that Wikipedia should cite and that you should as well (once you verify it). 

For a website it's a similar principle. If the website contains code that you're using, then cite it (or better yet, cite the associated material that the code authors might suggest you cite instead). But if the website merely contains expository material that helps understanding, then you don't cite it.