Why doesn't $$\int\lfloor {x}\rfloor~dx=x\lfloor x\rfloor +C?$$
When I tried integrating $\lfloor {x}\rfloor$ initially, I thought of the integral as representing the area beneath the graph and so was successful in finding its indefinite integral. However, when I tried thinking about it from a 'formulaic' perspective, ie without thinking about what the integral really meant, I've become confused:
If we try integrating by parts, we seem to get $$\int\lfloor {x}\rfloor~dx=x\cdot\lfloor {x}\rfloor-\int x\cdot\frac{d}{dx}(\lfloor {x}\rfloor)~dx=x\lfloor {x}\rfloor+C$$ since I would think that $\frac{d}{dx}(\lfloor {x}\rfloor)=0$.
Please can you explain why my result is wrong? I would guess that it has something to do with the derivative of the floor function being undefined at places where there is jump discontinuity, but I'm not sure.

Because $d\lfloor x\rfloor/dx$ is not everywhere zero. The derivative as it is classically defined does not exist at each integer where the function value jumps by 1. In the framework of distribution theory, the derivative may be rendered as having a delta function at those integer points, so properly:
$d\lfloor x\rfloor/dx=\Sigma_{-\infty}^\infty \delta(x-n)$
Plug this in with the formula
$\int_a^b f(x)\delta(x-c) dx =f(c), a<c<b$
after your integration by parts and you should properly get
$\int\lfloor x\rfloor dx = x\lfloor x\rfloor-(1/2)(\lfloor x\rfloor)(\lfloor x\rfloor-1)+C.$