In your constructor, I see this line that stands out:
Code:
Dig1 = new DigitalInput(1, 1);
The DigitalInput constructor you're using looks like this:
Code:
DigitalInput::DigitalInput(UINT32 slot, UINT32 channel)
By constructing with DigitalInput(1, 1), it will try to look for a digital input on module 1. This won't work, since that's the analog module.
If you change it to look like this it should read Digital Input #1 from the default digital module (module #4).
Code:
Dig1 = new DigitalInput(1);