Mega Code Archive
Memory management new-delete
#include
#include
int main ()
{
char input [100];
int count,n;
long * longPointer, total = 0;
cout << "How many numbers do you want to type in? ";
cin.getline (input,100);
count=atoi (input);
longPointer= new long[count];
if (longPointer == NULL)
exit (1);
for (n=0; n