Implementation of Fast Fourier Transform in C++ and its applications