Let $f(x)$ be a differential real function defined on the real line. If $f(0)=0$ and $f'(x)=[f(x)]^2$, then $f(x)=0$ foi any $x$. Again, $f:\mathbb{R}\to\mathbb{R}$ is differentiable, $f(0)=0$, and $f'(x)=[f(x)]^2$ for every $x$. A friend suggested the following argument:

If exists $c$ such that $f(c)\neq0$, there exists an interval $I$ around $c$ such that $f(x)\neq0$ if $x\in I$ (because $f$ is continuous since it is differentiable). In that interval, we could define $g(x)=x+\frac{1}{f(x)}$. This function $g$ would be differentiable and $g'(x)=0$. Then $g(x)$ is constant, for example, $k$. Then, $f(x)=\frac{1}{k-x}$ for $x\in I$

But I don't know where to find an absurd. What should I do next?

I think I should use the fundamental theorem of calculus and try to find an absurd with $f(x)=\int_0^x f'(t)dt=\int_0^x [f(t)]^2 dt$, but I also didn't got anywhere.

Thanks in advance.
Suppose $f(x)$ exists on some closed interval $[0,\delta]$.  Let $F=F(\delta)$ be its maximum value on this interval.  If $x\in(0,\delta)$, then your integral equation $f=\int f^2$ yields
$$
|f(x)|\le \int_0^xf(t)^2dt\le x F^2.
$$
Hence, 
$$
F(\delta)\le \delta F(\delta)^2.
$$
If $F(\delta)\neq 0$, then
$$
1/\delta\le F(\delta).
$$
This contradicts continuity of $f(x)$ at $x=0$, since we can choose $\delta$ arbitrarily small.
Consider the differential equation (y=f(x)) $y'=y^2$.  The solution is $y=\frac{1}{c-x}$ where c is an arbitrary constant.  If f(0)=0, then c must be infinite, so that f(x) is identically 0.