Why this error?
Error:error C2065: 'cout' : undeclared identifier
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#include "stdafx.h"
#include<iomanip>
#include<cstdlib>
#include<ctime>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
const int arreysize=7;
int frequency[arreysize];
int roll,face;
srand(time(0));
for(roll=1;roll<=1000000;roll++);
frequency[rand()%6+1]++;
[b]cout[/b]<<"face"<<setw(13)<<"frequency\n";
for(face=1;face<= arreysize;face++)
cout<<setw(4)<<face<<setw(13)<<frequency[face];
return 0;
}
|
Last edited on
Check your #includes, #include <iostream>
is missing.
oh,sorry.
thank you!!!!!!!!!!!