Update main.cpp

Fix the pointer issue, and inlcude <string> class