Initializing Variables

The title says it all.

I just want know what this means and how you would use it.

Thank you.
Initializing is simply assigning a value to the variable when you declare it. To initialize a variable simply add an assignment operator and the value you would like the variable to be initialized to like so:

int x = 0;

Don't forget to add a semicolon at the end like a regular declaration since it is still a single statement.
Thank you.
Topic archived. No new replies allowed.