One thing to do is to creat new project and selecte the target device. This will automatically add the header file for your target device. One more thing to check is that, while working with ADC, you might have not included the ADC library. Add this library from Library Manager and all will be fine. Rest seems to be fine with the code