Error executing C++ code

For school assignments, I am starting to use C++, so I am trying to use it with gradle, I made a C++ application, it does not recognize the .h file even adding the folder where the file is.

It mentions this task :app:compileDebugCpp, and it wasn’t there until I ran gradle run.

Maybe I don’t know how to organize the code using gradle, I would like if you could help me.

continuation with code Error executing C++ code continuation with code - Album on Imgur

If you having trouble finding your .h files due to an issue with your project configuration. Gradle requires you to explicitly tell it where to look for header files when compiling C++ code. Check Your Source Layout: Gradle expects a default directory structure, such as:

src/main/cpp
src/main/headers

Ensure your .cpp files are in src/main/cpp and .h files in src/main/headers (or adjust accordingly).