LED CUBE PROGRAMMING ERRORS

Hey there, I am doing a mini project on led cube, which makes use of atmel atmega 16 IC. So the programming part is getting difficult on my side, as there are some errors shown in the program and i am unable to solve those.
I compiled this program (which i have attached along with this forum as program.docx) on ARDUINO software. The errors shown to me are as follows:-

sketch_oct06a:5: error: ‘::main’ must return ‘int’
sketch_oct06a:4: error: ‘::main’ must return ‘int’
sketch_oct06a.ino: In function ‘int main()’:
sketch_oct06a:7: error: ‘DDRA’ was not declared in this scope
sketch_oct06a:16: error: ‘PORTA’ was not declared in this scope
sketch_oct06a:79: error: ‘PORTA’ was not declared in this scope
sketch_oct06a:103: error: ‘PORTA’ was not declared in this scope
sketch_oct06a:149: error: ‘PORTA’ was not declared in this scope
sketch_oct06a:182: error: ‘PORTA’ was not declared in this scope

So please help me out solve the following errors.
And please suggest me how do i burn my atmel atmega 16 IC. As i searched on net it said that there is no specific arduino kit available for burning of IC atmel atmega 16.
My local electronic component provider said that there is some kit available known as SP-200. Should i buy it or is there some other procedure to burn IC atmel atmega 16 ? please do suggest. Thankyou

program.doc (33 KB)

which i have attached along with this forum as program.docx

It seems that you didn't and in any case that is a horrible way to show us your code. Please read and follow the advice in read this before posting a programming question

At least some of the errors, those concerning ports and registers is probably caused by the fact that the micro that you are using does not have those ports and registers.

What is this, some kind of homework assignment? Your code it identical to aashu's:

Please read the two posts at the top of this Forum by Nick Gammon before you post here, especially when posting source code.

Atmega16?
http://www.atmel.com/devices/ATMEGA16.aspx
Looks like a crippled version of '1284P:

16 Kbytes of In-System Self-programmable Flash program memory
512 Bytes EEPROM
1 Kbyte Internal SRAM

Looks like you can still buy them tho:
http://www.mouser.com/Semiconductors/Embedded-Processors-Controllers/Microcontrollers-MCU/8-bit-Microcontrollers-MCU/_/N-a85ik?P=1z0z63xZ1z0yrrj&Keyword=atmega16&FS=True
Looks like avrdude.conf supports it:

#------------------------------------------------------------
# ATmega16
#------------------------------------------------------------

part
    id               = "m16";
    desc             = "ATMEGA16";
    has_jtag         = yes;
    stk500_devcode   = 0x82;
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x94 0x03;

Port-wise it looks like a '1284P, so you may be able to just create a new boards.txt set of entries for it and upload it via ICSP. Not sure how you'd build a bootloader for it if you wanted to do serial uploads.
I use Atmel AVR ISP MKii for loading via ICSP. Unfortunately they are no longer available.
Next step would be a USP ASP programmer like this
http://www.hobbyking.com/hobbyking/store/__27990__USBasp_AVR_Programming_Device_for_ATMEL_proccessors.html?strSearch=usb asp
Or using an Uno as a programmer
Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board