I have a simple question that im not sure of. When do we know when to use int, long int, and string. I know its size but in terms of numbers or characters can you explain it. I was writing a program and passing in a calculated number. When i changed it from long int to string it worked. When should i know when to classify something as an int, long int, or string.
On most compilers int and long are the same. int and long are meant for intergers while string is meant for a string of characters. A string can be numbers, letters, and other characters. So if you want to do mathematical equations you are going to want to use int and not string.