Variable Scope Problem with Inheritance.

To lay it out, I am trying to modify a variable declared in the child class inside of a pure virtual method from the parent class. The compiler says it's not in scope. Any help would be great.

Here are the compiler errs:
Locomotion.cpp: In function 'void sendData(NewSoftSerial*, uint8_t*, uint8_t)':
Locomotion.cpp:37: error: 'speed' was not declared in this scope
Locomotion.cpp:38: error: 'isForward' was not declared in this scope
Locomotion.cpp:42: error: 'packetType' was not declared in this scope
Locomotion.cpp:49: error: expected primary-expression before ')' token

Child Class Variable Declaration.

#include "ComInterface.h"

class Locomotion: public ComInterface
{
protected:
        uint16_t speed;
	bool isForward;
... omitted rest.

Child Class Implementation of pure virtual method that modifies the variable

void sendData(NewSoftSerial *theSerial, uint8_t *ptr, uint8_t length)
{
	address = ((byte*)&(speed));
	size = sizeof(speed)+sizeof(isForward);
	uint8_t CS = size; // need to calculate the size bassed on properties!!!

void Locomotion::sendData(NewSoftSerial *theSerial, uint8_t *ptr, uint8_t length)
{

Wow that's a knee banger. O well that's what you get for programming at the wee hours of the morning. Thanks a lot.

Is that anything like a face slapper?

You are welcome.

To lay it out, I am trying to modify a variable declared in the child class inside of a pure virtual method from the parent class.

I don't think this is what you are trying to do at all.

A pure virtual method means that the parent class defines the name and signature of a method that the child class must implement, but does not itself offer an implementation.

A virtual method means that the parent class defines the name and signature of a method that the child class may re-implement, and provides an implementation in case the child class does not re-implement it.