Jump to content
Posted 07 December 2012 - 01:47 PM
Posted 07 December 2012 - 02:05 PM
A variable is basically a memory block or data object. You can read from it, and generally you can write to it. Variables can be of many different sizes and types.
What is the difference between a pointer and a variable?
Edited by frob, 07 December 2012 - 02:11 PM.
Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.
Also check out my personal website at bryanwagstaff.com, where I occasionally write about assorted stuff.
Posted 07 December 2012 - 10:54 PM
char a; /* A variable that holds a character */
int b; /* A variable that holds an integer */
MyStruct c; /* A variable that holds a structure */
char * x; /* A variable that points to a character */
int * y; /* A variable that points to an integer */
MyStruct * z; /* A variable that points to a structure */
Edited by Aldacron, 07 December 2012 - 10:55 PM.
Posted 08 December 2012 - 03:02 AM
Posted 10 December 2012 - 06:12 AM