#include "stdafx.h"
#include <iomanip>
#include <ostream>
#include <fstream>
using namespace std;
void FillArray(int x[ ], const int Size);
void PrintArray(int x[ ], const int Size);
int main()
{
const int SizeArray = 10;
int A[SizeArray] = {0};
FillArray (A, SizeArray);
PrintAray (A, SizeArray);
return 0;
}
void FillArray (int x[ ], const int Size)
{
for( int i = 0; i < Size; i++);
{
cout << endl << "enter an integer"; //cout undeclared here
cin >> x[i]; //cin and i undeclared here
}
“cout”、“cin”和“i”都得到错误“ error C2065: 'cin' : undeclared identifier
”。我不知道如何解决它们。我必须有三个函数:主函数、填充数组和打印数组。帮助表示赞赏。