Your FFT code initializes a complex array because that is what the Fourier Transform produces. You should understand the [complex exponential][1], and the nature of the transform as a change of basis (i.e. a projection onto a basis of sines & cosines). 

It is a big topic that is well travelled, start here:
http://stackoverflow.com/questions/10304532/why-does-fft-produce-complex-numbers-instead-of-real-numbers


  [1]: http://dsp.stackexchange.com/questions/8482/what-is-the-role-of-complex-exponential/8483#8483