Quote:
Originally Posted by byteit101
also if you do this
Code:
type *varname;
...
varname=value;
you assign varname's address at memory the value of value
you need to do this
Code:
type *varname;
...
*varname=value;
OR
type *varname;
...
varname=&value;
|
Generally speaking, yes. However, OP's assignment of the only pointer he is using is correct:
Code:
struct Command *currentCommand;
// ...
currentCommand = command_list_X;
command_list_X is an array of "struct Command". Assigning to a pointer using an array (of the same base type) is perfectly legitimate and will simply result in the pointer pointing to the base of the array.