what is the code to add a new item to the array
i did like that
int Num[current_item];
int new_item;
Num[current_item]=new_item;
current_item=current_item+1;
cout<<"the number you added is:"<<new_item<<endl;
what is the code to add a new item to the array
i did like that
int Num[current_item];
int new_item;
Num[current_item]=new_item;
current_item=current_item+1;
cout<<"the number you added is:"<<new_item<<endl;
What do you mean with adding a new item to the array? Something like this:
Code:int array [ARRAY_SIZE]; int index; for (index = 0; index < ARRAY_SIZE; index++) { // add item to array array [index] = index; cout << "Added number = " << array [index] << endl; }
if all the data types match then this should work fine....
matheo917