http://www.virtualroadside.com/WPILi...r_station.html
I have linked the relevant API documents. You can use DriverStation::GetDigitalIn([number]) to get the value of the switch.
And PLEASE try to take a little more time writing your posts in the future.