Hi everyone, I am new c++ learner and I am watching a series of youtube right now.
Watching this tutorial
YouTube
I cannot understand the reason that the tutor uses string to store information for age (using the getline function to pass information from the user) and then he converts the string into integer to make some comparisons..
It wouldn't be much simpler to use int as data type for age and then use cin >> age; to receive data from the user?
Thanks in advance