my daughter as been coughing for about two hours continuously,she is 2 years old

Give cool clear liquids such as water or juice (avoid citrus juices) which may be helpful and soothe a child’s throat.
If your daughter has a “barky” cough, take her into the bathroom with the door closed, turn on the hot water and let the room get steamy. Stay in the steamy room for about 20 minutes and the cough should subside. If it does not improve, consult doctor.
Do not give over the counter cough or cold medications to your child without consulting doctor.