Unable to copy a float array from host to device

I am trying to copy an array of floats from the host to another array of floats on the device. This is how I did it :
// copy input array from the host (CPU) memory to the device (GPU) memory
//both src and dest arrays are already allocated on both CPU memory and GPU memory respectively. src has been also initialized.

for(int i=0; i<array_size;i++)
cudaMemcpy(&dest[i], &src[i], sizeof(float), cudaMemcpyHostToDevice);

and this is the error message I am getting at compilation time :

error: expected constructor, destructor, or type conversion before ‘(’ token
cudaMemcpy (pa, pah, N*sizeof(float *), cudaMemcpyHostToDevice);
^

Could someone please point me the source of this error? My function call of cudaMemcpy seems to be conmpliant with the signature of the function :

cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, enum cudaMemcpyKind kind).

Am I missing something here please?

The error is likely occurring due to some part of your code that precedes this.

The code you have shown will compile:

$ cat t323.cu

int main(){

  float *src, *dest;
  int array_size = 10;
  for(int i=0; i<array_size;i++)
    cudaMemcpy(&dest[i], &src[i], sizeof(float), cudaMemcpyHostToDevice);

}
$ nvcc -o t323 t323.cu
$