Try adding .h in #include <iostream> or using namespace std