| awandering (7) | |||
|
I have multiple errors relating to my source code https://www.dropbox.com/s/qii6ti08xydelve/Coursework1.cpp the erros im getting are: 1> All outputs are up-to-date. 1>Coursework_1.obj : error LNK2019: unresolved external symbol "void __cdecl admin(void)" (?admin@@YAXXZ) referenced in function "void __cdecl process_main_menu(char)" (?process_main_menu@@YAXD@Z) 1>Coursework_1.obj : error LNK2019: unresolved external symbol "void __cdecl calc_new_member(void)" (?calc_new_member@@YAXXZ) referenced in function "void __cdecl process_main_menu(char)" (?process_main_menu@@YAXD@Z) 1>Coursework_1.obj : error LNK2019: unresolved external symbol "void __cdecl assign_loads(void)" (?assign_loads@@YAXXZ) referenced in function "void __cdecl process_selection_limit_state(char)" (?process_selection_limit_state@@YAXD@Z) 1>Coursework_1.obj : error LNK2019: unresolved external symbol "void __cdecl determine_loads_file(void)" (?determine_loads_file@@YAXXZ) referenced in function "void __cdecl process_selection_limit_state(char)" (?process_selection_limit_state@@YAXD@Z) 1>Coursework_1.obj : error LNK2019: unresolved external symbol "void __cdecl member_dimensions_file(void)" (?member_dimensions_file@@YAXXZ) referenced in function "void __cdecl process_selection_limit_state(char)" (?process_selection_limit_state@@YAXD@Z) 1>Coursework_1.obj : error LNK2019: unresolved external symbol "void __cdecl select_member_manually(void)" (?select_member_manually@@YAXXZ) referenced in function "void __cdecl display_details_member(void)" (?display_details_member@@YAXXZ) the header file has code
| |||
|
|
|||
| Branflakes91093 (144) | |
|
These errors are very straightforward. They are telling you that the definitions for those functions listed were not found. This could be because you weren't consistent in your naming schemes (everything is case-sensitive), you made a typo, or you forgot to actually include the definition. You declared and defined the function "Admin()" but you tried to use "admin()". "calc_new_member()", "assign_loads()", "determine_loads_file()", "member_dimensions_file()", and "select_member_manually()" aren't even defined. | |
|
Last edited on
|
|
| awandering (7) | |
|
Thank you very much.... would you able to help with one more question?? When I run the programme and Select Option B then A it does not call the function member_dimensions()... or if it does it goes straight back to the calling function. thanks | |
|
|
|
| Branflakes91093 (144) | |
|
Can you put the code back up? The dropbox link isn't working anymore. But, I do recall seeing some completely empty function definitions - could "member_dimensions()" have been one of them? | |
|
|
|
| awandering (7) | |
| https://www.dropbox.com/sh/o1bpsgxa1z6glom/4oe_9KrbzK | |
|
|
|
| Branflakes91093 (144) | |
Lines 169, 171, and 174 shouldn't compile. On line 168, you declare char menu_selection; but then use menuSelection on the other lines.It feels like there is a lot of copy/pasting going on. This is never a good practice - it usually signifies that something can be done in a much easier way. It also makes your code prone to mistakes such as the above. The loops on lines 278 and 531 are never executed. You should reevaluate the logic. The loop on 545 is flawed - you cannot do comparisons like that. You must write it out entirely: while(temp_duration_class != 1 && temp_duration_class != 2 && ...). Or you could use ranges: while(temp_duration_class < 0 || temp_duration_class > 5)The loops on lines 239 and 253 will never run. Check your logic. As for your specific problem in your last post, it looks like runtime will get caught in the loop on line 171 unless the user inputs 'H'. It also seems that line 173 isn't what you want there, but I'm not sure. I highly recommend that you use a debugger to step through the code to fully understand what is going on. EDIT: | |
|
Last edited on
|
|