Cough with chest pain can be taken if it is caused by a cold, but not if the cause is unknown. If you are in the course of a cold and have chest pain caused by a severe cough, you can take cold medicine. It can improve the symptoms to a certain extent, so as to reduce the cough, and gradually relieve the chest pain caused by coughing. However, if the relief is not obvious, then you need to consult a doctor in time to avoid delaying your condition. If the cause of the cough and chest pain is not clear, you should not use medicines blindly. Cough and chest pain can be caused by a variety of illnesses, including lung infections and myocardial ischemia, not all of which can be treated with cold medicines. Therefore, it is recommended to seek medical advice and under the supervision of a doctor to carry out tests to clarify the cause of cough and chest pain, and at the same time, use medication as prescribed by the doctor.