error: size of array 'momentumOfparticles' has non-integral type 'float [i]'

Please edit your post
Add
** **[code]** **
before the code
Add
** **[/code]** **
after the code

It will prevent the forum software from mangling it.