The line you provided is legal syntax, but doesn't really do anything.
total:num1+num2;
In this line "total" is just a label (because it is followed by a colon). If you added goto total; somewhere in your code, the code would jump to this line.
Your line adds together num1 and num2, but does nothing with the result. So the addition happens (unless optimized out of the code by the compiler), but nobody knows what the result was because it was never stored anywhere.
So, there is actually nothing wrong with your computer or your compiler.
you are not understanding what he said. For some weird reason he put the code on a 3rd party site, and THAT version worked, not YOUR version.
your version, as already said, does NOT assign the addition into total, so total remains whatever value it had. That happened to be zero, which is often done by debug builds, but it could be anything in a release build (including zero).
just change the : to =
its just a typo that you made that happens to be legal syntax so it compiles and runs (the worst kind of typo there is!).