variables=confusing

I don't understand about variables so can you please tell me the lesson 2 things variables and data types its confusing to me. Thx in advance!
i mean that way they say it is confusing i mean i don't even know what the variables do i just need something like: variables do...
Variables hold information. Often a number.

For example you could use an int to represent someone's age:

1
2
3
4
int myage = 15;

cout << "I am " << myage << " years old.\n"
cout << "Tomorow is my birthday, so I will be" << (myage + 1) << "years old.";
oh! ok so its basicly holding info that can be changed but it always remembers the first number and can add/subtract ect ty!
Last edited on
Topic archived. No new replies allowed.