stuck printing values from array
hi,
i'm trying to print the values that were entered into an array
i'm stuck, can somebody plz help me out?
thanks
Code:
#pragma hdrstop
#include<iostream>
#include<conio>
using namespace std;
//---------------------------------------------------------------------------
#include<cstdio>
#include<cstdlib>
#pragma argsused
int array[];
int size;
void displayArray(int nArray[], int nSize);
int main(int argc, char* argv[])
{
int value;
int numValues = 0;
int inputValues[128];
do
{
cout << "Enter a value into the array: ";
cin >> value;
if (value < 0)
{
break;
}
inputValues[numValues++] = value;
}
while(numValues < 128);
void displayArray(int nArray[], int nSize)
cout <<"The value of the array is:\n";
for (int i=0; i<nSize; i++)
{
cout <<i<<": "<<nArray[i]<<"\n";
}
cout <<"\n";
}
getch();
return 0;
}