View Single Post
  #7   Spotlight this post!  
Unread 23-03-2009, 00:33
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: HELP: Robot Crash in Autonomous

Quote:
Originally Posted by byteit101 View Post
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.
Reply With Quote