Complie fails in generated.h file

Hi, guys

I got compiling failed after i try to reduce the project size by deleting Binaries, Intermediate, and Saved folders and then rebuild them.

then i got these errors without any code changed the first error is in the generated.h file as you can see in my attached image it produces 100 errors for the whole .h and .cpp file

so what steps i’ve done so far trying to fix this

  1. delete .h and .cpp files that produced the issue and then the issue goes to the some of next file in subfolder

  2. Create new c++ class, copy and paste the same code into it and the problem still occurs

  3. Upgrade engine to the latest version 4.24.3

  4. try to delete Binaries, Intermediate, and Saved folders then rebuild again

and it seems still not working

so how can i manage to fix this issue guys ?

Thanks for your help