made sure that std namespace is used for cout

Used auto, preincrement operators, and made sure that cout/endl/string all have std:: before them since you didn't use using namespace std;