Atmega 328 uart program: compiler error on undeclared variable on register name ending with "n"
The 'n' is meant to be a placeholder for the actual UART peripheral that you want to use when discussing the set of registers associated with the UARTs.

So if you had two UARTs, you could read the status register from the first UART by replacing it with a '0' or the second UART with a '1' like: UCSR0A or UCSR1A - note that these two are #define'd for you in a register definition file.  Since we only use the UCSRnA convention for when we refer to these registers in discussion, it will not be #define'd to a register and thus using it in code will throw an error.  You can follow your #include statements to find where they are defined.  The register definition file and datasheet are usually two things that I have handy when working.

The ATmega328 only has one UART peripheral, but follows the same naming convention.  So you would replace it with a 0.  Regarding being able to read/write to a serial port - assuming that you have hooked up your MAX232 correctly, have you set your baud rate correctly on both the ATmega and the PC?  Post the rest of your UART initialization code if you want further help debugging that.

EDIT: Summary of follow-up comments.


Check your clock frequency and make sure it's correct when
calculating the baud register value
Ensure that both uC and PC have same UART settings (baud, parity, stop bits)
Try not to use random code samples that may or may not be valid for your hardware configuration.