I'm a novice in c++ and intend to carryout a project on automatic control of an egg incubator. This project is
to be used as an end of course defence. Soebody should kindly give me a c++ code for a temerature and humidity sensors. This will be used to programme PIC18F4550.

you will have to get the specs from the manufacturer how to get that info.

My main problem is that l intend to use a microcontroller to control a locally maid egg incubator. The control parameters are temperature, humidity and a stepper motor to change the poition of the eggs three times a day. The microcontroller will control halogen bulbs as a heater and a fan for humidity control.