Unresolved External Symbol - How to fix?

前端 未结 4 366
故里飘歌
故里飘歌 2021-01-21 12:48

I\'m pretty new to programming. I have run into this error that I can\'t figure out. You should be able to put in a score and it will use the information that is pre put in the

4条回答
  •  迷失自我
    2021-01-21 13:13

    It means that you declared the function to be named checkScore but you defined the function to be named checkGrade. Then when main() tries calling checkScore the compiler says "OK, that was declared above. I'll allow it even though I can't find it. It might be in a different library or source file.". Then it is the responsibility of the linker to find it. Since the linker finds checkGrade but doesn't find checkScore, the linker then throws the error saying undefined reference (main() references checkScore and not checkGrade).

提交回复
热议问题