You know that friend who says "I'm totally over my ex" and then brings them up in every conversation? That's this code with using namespace std; Line 11 boldly declares using namespace std; which is supposed to let you drop the std:: prefix and just write string instead of std::string . But then lines 14, 15, 21, 28, and 35 are all like "nah, I'm gonna fully qualify everything anyway with std:: ." It's the programming equivalent of installing a dishwasher and then hand-washing all your dishes. The developer either copy-pasted code from different sources without harmonizing the style, or they're having an identity crisis about whether they trust their own namespace declaration. Pick a lane, my friend—either embrace the namespace or don't, but this half-committed relationship status is giving everyone trust issues.