[code]#include <iostream>
using namespace std;
void printMsg();
void printArray(int arg[],int length);
void inputArray(int arg[]);
int total;
int main()
{
int samArray[10];
int distotal=0;
printMsg();
inputArray(samArray);
printArray(samArray, 15);
for (int x=0;x<15;x++)
{
total=(distotal+samArray[x])/15;
return 0;
}
void printMsg();
{
cout<<"****\n";
cout<<"Array Function";
cout<<"****\n";
}
void printArray(int arg[],int length) //'printArray' : local function definitions are illegal[code][/code]
{
for(int n=0;n<length;n++)
{
cout<<"["<<arg[n]<<"]"<<endl;
}
void (int i=0;i<10;i++);
{
cout<<"Enter Grade:["<<i+1<<"]";
cin>>arg[i];
}
system ("pause")
system ("cls")
}
}
note:
vb 6.0 is my software use
not turbo c
thanx[/code][output] |
[/output]
Last edited on
You should put your code in between code tags and tell the people what problem you are having.
//Like this
@bufbill //'printArray' : local function definitions are illegal
thats my error
You defined printMsg() and printArray() inside of main(). Take them out.