Getting a weird error when running this program and I can't seem to figure out what is going on. This is what the error shows:
/cygdrive/c/Users/brrr/OneDrive/Documents/NetBeansProjects/CppApplication_6/main.cpp:76:(.text+0x1df): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `getTotal(int, int)'
I have gotten this a few times today and it is something I have never seen before.
I am pretty new to this and everything that I have found online seems to be a little bit over my head. Any suggestions help!
Your function addTotal at the bottom should be called getTotal, and, as @Hengry points out, should be defined with a return type:
int getTotal( int amount, int total )
Given what it does it seems a rather superfluous function.