changed main.c to main.cpp, now coding in c++