Choosing a data type based on size
<p>I wanted to know when you all(experienced programmers) program in C++, how do you choose primitive data types? For instance, if you have a for loop that you know iterates 4 times, do you use unsigned short int or int8_t? Why? or why not? Is it all about optimizing memory?</p>

<p>There are so many types of int with different sizes, I figured there must be a reason.</p>