i have a problem to simulate program on array-based list :rolleyes: :sad: .The array can store 10 integer value.The application should be perform basic operation such as inserting,deleting and displaying the array's content :rolleyes: .Any extra operation are welcome.The application should promt user a menu as follow :

1)insert value
2)delete value
3)display value
4)exit

you are free to perform either forward or backword approach for inserting process.for deleting purpose: remove the most front element in the list.

Plez help me ur guys :) :cry: :-|

What is the problem you're having?

This is going to involve a lot of shifting of values stored in the array. You will end up shifting to the left when deleting any element other than the last one, and shifting to right when you add at any element but the last one. To shift to the left you shift the left most element to be shifted first, and then work to the right. To shift to the right you move the right most element to be shifted first and then work to the left. If you can figure out how to insert and delete from the first element of the array, you will probably have an easier time inserting between elements.

What is the problem you're having?

i have a problem to simulate program on array-based list .The array can store 10 integer value.The application should be perform basic operation such as inserting,deleting and displaying the array's content .Any extra operation are welcome.The application should promt user a menu as follow :

1)insert value
2)delete value
3)display value
4)exit

you are free to perform either forward or backword approach for inserting process.for deleting purpose: remove the most front element in the list.

Plez help me ur guys

i have a problem to simulate program on array-based list .The array can store 10 integer value.The application should be perform basic operation such as inserting,deleting and displaying the array's content .Any extra operation are welcome.The application should promt user a menu as follow :

1)insert value
2)delete value
3)display value
4)exit

you are free to perform either forward or backword approach for inserting process.for deleting purpose: remove the most front element in the list.

Plez help me ur guys

i dont know if i break the rules @ not by asking u guys this question.i just can make it 1/2 way je.the problem is i dont know how to use the forward @ backward corectly.i hope u guys can help me.I ask for help with hope i can learn something from u guys.Plez help me..thank you may god bless u and may u have a nice day

aew you trying to implement a queue?

he's trying to trick people into doing his homework for him.

This is going to involve a lot of shifting of values stored in the array.....

Or you could use a linked list.

I suspect the ultimate purpose of doing this exercise is to have the novice programmere experience for themselves the benefits of using pointers by having them add/delete/read forward/read backward from an array first and then show them how "easy" it is to do it with pointers and a list. At least that what is assume the original poster meant when saying:

i have a problem to simulate program on array-based list.

....i just can make it 1/2 way je....

Post what you have so far and you will be much more likely to get some help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.