Hi,
I was able to successfully copy/paste your snippet of code into my own project on 4.26.2, as well as in a fresh C++ project using engine version 4.25.4,and both compiled successfully. Is there any more information you can provide us here? Is there any more code within this file that you can provide us?
Here is a similiar thread to this issue that might be useful as well: https://answers.unrealengine.com/questions/301484/missing-type-specifier-int-assumed.html