不要加.h啊
#include <iostream>
你后面直接用cout的话,还需要加上using namespace std;才可以,否则还会报错
C++时,推荐使用
#include<iostream> using namespace std;