I don't think lines 15-20 would cause that, but if that is "ALL THE CODE. SERIOUSLY.", why make the variables global? If this is all your program does, you ought to put them in main().
You don't need to include cmath for what this function does.
Also, you don't need to put std:: in front of cout. That's what line 3 does for you.
I'll also note that g++ compiles your exact code without warning or error. I doubt CodeBlocks is playing tricks on you. Can you confirm once again that this is the only file with a main() function in your project?
Better yet, start a new, clean project. Make sure it is a "command line" or "console" application. Copy the code you showed us into the editor and save your project. Compile.
There is otherwise nothing wrong with the code you have shown us. If you still get the multiple definition error, then C::B is misconfigured.