I want to determine if a network card is enabled, up, and plugged in. Basically, I want to know if the network card will work. I need this information from with a C++ program, a
You can look at /sys/class/net/eth0/operstate where eth0 is your interface to see if it's up.
/sys/class/net/eth0/operstate
Look at /sys/class/net/eth0/carrier to see if there is a carrier.
/sys/class/net/eth0/carrier
Though I guess executing ifconfig and friends will give you more compatibility to *BSDs.
ifconfig