.cpp array
// ConsoleApplication3.cpp : Defines the entry point for the console application.
//chapter nine programming challenge 1
//date 10/08/2014
#include <iostream>
using namespace std;
//function prototype for functions defined after main function
int * arrayAllocator(int);
int main(){
int *aryptr=arrayAllocator(10);
cout<< aryptr[0] << endl;
int fred;
cin >> fred;
}
int * arrayAllocator(int num){
int * numptr;
numptr = new int[num];
numptr[0] = 55;
return numptr;
}
//chapter nine programming challenge 1
//date 10/08/2014
#include <iostream>
using namespace std;
//function prototype for functions defined after main function
int * arrayAllocator(int);
int main(){
int *aryptr=arrayAllocator(10);
cout<< aryptr[0] << endl;
int fred;
cin >> fred;
}
int * arrayAllocator(int num){
int * numptr;
numptr = new int[num];
numptr[0] = 55;
return numptr;
}