it's been a few days, I tried suggestions from every comment in this thread with no success. Earlier today, though, my teacher told me a way to fix it through the command system("chcp 65001 > nul")
, it didn't work, so I took off the set_locale command and library, and voĆla, special characters work.
I'm sorry to say I don't know how it works, however, instead of keeping this unanswered, I chose to share it here for future fixes. I'd appreciate any explanations as to why it works, though...