Compilation Error : C++ code taken as C

Hi all, I am participating the the September Challenge 2012. When I am submitting my program in c++, I am getting the following compilation error :-

/usr/lib/gcc/i486-linux-gnu/4.3.2/…/…/…/…/lib/crt1.o: In function _start': /home/aurel32/tmp/glibc/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference to main’ collect2: ld returned 1 exit status

When I go to My Submissions, it shows me that I submitted the code in C, but while submitting I always select “C++(gcc 4.3.2)”. Moreover, I have tried with the extension .cpp as well as .cc, but it didn’t help. The code is compiling perfectly fine in my machine(having gcc 4.4.6).

It would be great if anyone of you guide me in what’s the correct way of submitting the code in c++. I have already gone through the complete FAQ twice, but didn’t find any reference to such a problem.

Regards,

Jayant

Do you have a main() function in your program??

@jayantjpr use your official proxy instead of gproxy or ccproxy :smiley:

I was using a memset(), when I removed it the error disappeared …

main() function missing