So in my QFT course, my professor said that you can set $c$ and $\hbar$ to 1. And he gave us an example:

$$E = mc^{2}$$

And then set $c = 1$:

$$E = m$$

This seems completely ludicrous to me to do. Doesn't it change the result? Why can this be done and why isn't it wrong? 

I mean, $E = mc^{2}$ gives you one answer and $E = m$ gives you another, completely different answer!