What is the matter with this C++ code?
I get an error message saying: that there should be a ; before z, which is not correct. The only part t
;
z
using namespace std; means you can write cout later on rather than std::cout. It saves typing at the expense of gross namespace pollution.
using namespace std;
cout
std::cout
Your compile error can be fixed by writing cout << z;
cout << z;
Also, do return a value from main.
main