Unfortunately I don't have answer to your question, but I have two suggestions
1) make a much more descriptive title - this will entice people to investigate your problem
2) Please use code tags. This makes the code that you post much more readable.
why don't you take another approach to solve this problem. I would suggest using a pointer called " start " to mark the beginning of the list and then use another pointer called "p" to enlarge the list. The pointer "p" will be changed as needed. give it a shot and i'm ready for help.
Actually u got quit of what i meant. Good, but its possible to make the code simpler. you can do it this way:
for ( int c = 1; c<=n; c++ )// making the circular list.
p->next = start;
p -> next = new node;
Note that there is no need to use ( head & start ) pointers twice, one of them is enough. Also the (n-1) way made it confusing and a little bit complicated. Always to try to make your code simple and stupid. i hate to give the answer directly with out making you to figure it out your self, but its my fault i replied late and i think its not worth waiting this long time if we gonna make it step by step.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.