Creating a program for fun, making it to show me my homework for the semester and such. But I have a few problems. I'm getting the "Id returned 1 exit status" error when I compile this. And another thing, I dont know how to make it return to main like its a main menu.
When I compiled the program this is what I received:
Severity Code Description Project File Line Suppression State
Warning C4101 'q': unreferenced local variable Id returned 1 exit status EP e:\vs projects\id returned 1 exit status ep\id returned 1 exit status ep\original code.cpp 29
Error LNK2019 unresolved external symbol "void __cdecl math(int,int,int)" (?math@@YAXHHH@Z) referenced in function _main Id returned 1 exit status EP E:\VS Projects\Id returned 1 exit status EP\Id returned 1 exit status EP\Original Code.obj 1
Error LNK1120 1 unresolved externals Id returned 1 exit status EP E:\VS Projects\Id returned 1 exit status EP\Debug\Id returned 1 exit status EP.exe 1
The warning means that you defined "q" in the function and never used it.
Not that the error message is clear, but it refers to the prototype,function call and the function definition. All three have to match. Check your spelling. Case does make a difference.
I am not sure what this means "Id returned 1 exit status". I would guess that since the compile has errors this is just telling you there is a problem. Once you correct the errors everything is fine.
ld is the widows linker. An exit status of non zero means that it failed. So the compilation was successful, but the link failed. (The error message is obviously from the linker.)