0
When would you use an int vs. a double in creating a variable?
2 ответов
0
common uses for an int is to iterate through something as a loop control variable. A double is a real number and is more precise than float though precision can still be an issue with a double when representing currency as a double.
+ 1
int is an integer of 4 bytes of memory (cpp standard)
double is a real number of 8 bytes
so it is for you to choose what you need