Amit, you should get a warning, not an error. (when you compile with -Wall, for instance) The warning is possibly because every C function expects something returned. I've been seeing this in the gcc compilers of the 2000s. Earlier, void main(void) with a blank return; statement at the end never gave any warning. Cheers, Sumantra.
On Mon, Jan 26, 2009 at 09:46:27PM +0545, amit kumar wrote: > i get an error with using void main() instead of int main() , -- ********************************************************************* SUMANTRA DUTTA ROY Ph Office: +91 - 11 - 26591084 Department of Electrical Engineering Ph Resid.: +91 - 11 - 26597084 Indian Institute of Technology Delhi Ph MM Lab: +91 - 11 - 26596167 Hauz Khas, New Delhi - 110016, INDIA Facsimile: +91 - 11 - 26581606 http://www.cse.iitd.ac.in/~sumantra/ email: [email protected] Office: II-245, Res: 38 North Avenue email: [email protected] _____________________________________________________________________ UDYOGINAM PURUSHASIMHAM UPAITI LAKSHMEEH DAIVEN DEYAM ITI KAAPURUSHAAH VADANTI DAIVAM NIHATYA KURU PAURUSHAM AATMASHAKTYAA YATNE KRITE YADI NA SIDHYATI KO ATRA DOSHAH (Favourite Sanskrit Shloka) ********************************************************************* --~--~---------~--~----~------------~-------~--~----~ l...@iitd mailing list -- group http://groups.google.com/group/iitdlug -~----------~----~----~----~------~----~------~--~---
