View Single Post
  #2   Spotlight this post!  
Unread 26-06-2009, 01:53
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is offline
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: Issues with a header file

One issue immediately jumps out to me. You're declaring your Victors, Relay and Joystick as objects in the header file, but initializing them in the constructor as if they were pointers. You need to either declare them as pointers (e.g. Victor* leftDrive) or fix your constructor to have an initialization list:
Code:
IterativeDefaultRobot::IterativeDefaultRobot(void) :
leftDrive(1), rightDrive(2), driveStick(1), testspike(1)
{
...
}
If you're having problems apart from that, it would be great if you could post the relevant compiler output.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com
Reply With Quote