Bladder infection

Doc prescribed me "Bactrim" for it which is pregnancy category c. I have blood in my urine & have to take this Medicine bc I am In pain. Praying this doesn't harm my baby girl. Has this happened to anyone else?