![]() |
| ||
| Please help with this menu Okay, so I have a menu and a linked list, but I have three problems. First of, if you select option one and enter a name it keeps prompting you to enter another and another. It won't accept any other prompt to do anything else like, for instance, exit the program. Next, I want to be able to insert a name into the list or modify a name. I just can't figure out how to do those two. Any help would be greatly appreciated. The current code that I have generates the following errors: error C2062: type 'void' unexpected error C3861: 'modify': identifier not found If I remove void insertend(void), void modify(void); those errors disappear, but I included them in anticipation of getting the insert and modify features working. Here is the code: #include <stdio.h> |
| ||
| Re: Please help with this menu I'll try and look at it anyway, but if you have an error, why don't you include where the error came from (almost all compilers will give you a line number). Also, when posting C code, please use C code tags [code=c]/* code here */[/code] like this: /* code here */to get line numbers and syntax highlighting. Your code has: void load(void), list(void); It should be: (You're declaring functions, not variables) void load(void); Your posted code did not define void insertend(void)or void modify(void) If you're not prepared to implement them now, declare them as stubs: void insertend(void) Your menu has two options 6's: printf("6. Load the file\n");maybe one should be 7?When I ran the program, it stopped taking names when I entered a blank name. It then re-displayed the menu. |
| ||
| Re: Please help with this menu Thanks for taking a look at it. I eagerly await your response. Sorry about the code tags. I clicked the button to place them, but I must have accidently pasted over them. Yes, that should be a 7. I accidently entered 6 in there twice. You had mentioned that it took you back to the menu when you entered a blank name. Well, that's good that you could get back to the menu, but it seems a bit confusing. You would almost have to explain to the user that they must hit enter to get back to the menu and, maybe it's just me, that that just seems to confuse things. To me, it seems like you should just be able to enter a different number after you enter a name instead of being continually prompted for name after name. |
| ||
| Re: Please help with this menu If you changed inputs("Enter name: ", info->name, 30); to inputs("Enter name (leave blank to quit): ", info->name, 30); the way to quit would be clear.(Did you really need my advice for that?) |
| All times are GMT -4. The time now is 7:18 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC