newbie needs help with this...
can anybody help?
Printable View
newbie needs help with this...
can anybody help?
Please read our homework policy. You need to put in some effort, show what you have done, before help is given.
ok sorry...
i tried to do with inserting but it doesnt work this is my algorithm...
any help?Code:where s=array size and p=position
void insert (int a[], int s, int p)
{
for (int i=s; i<p-1; i++)
a[i]=a[i+1];
a[p]=a[i];
s++;
}
for (i=0; i<s; i++)
cout<<a[i];
There is no linked list in sight in your code. That's trying to insert into a plain old array.