temp1:12:3: error: 'DDRA' was not declared in this scope DDRA = 0x00; /* Make ADC port as input */
An ATMega328P does not have a GPIO port A.
The code must be for some other AVR, and to make it work on this MCU, you have to use the ports and pins that are availabe, which means the code needs changes to work on another AVR.
Do not assume that any other peripheral register has identical usage.