I've also a rant on why casting the return value of malloc is always
the wrong thing to do somewhere, which I'll try to dig out
2011/10/4 Antóin Óg Ó Cuinneagáin <anthony.c...@gmail.com>:
> Very basic and the going is slow but will get there eventually
> https://docs.google.com/present/edit?id=0AZNgFR-wWJahYWpnbnp0ZGo5OHc0XzQwZnFwcXZ6Z3Q&hl=en_US
>
--
Duncan Thomas
#include <stdio.h>
int main(){
return 0; //for success
}
No nasty non standard from me I assure you :-)
int main(void)
or
int main(int argc, char *argv[])
not
int main()
refs:
http://stackoverflow.com/questions/1765686/correctly-declaring-the-main-function-in-ansi-c
http://c-faq.com/ansi/maindecl.html
http://c-faq.com/ansi/voidmain.pjp.html
http://www.eskimo.com/~scs/readings/voidmain.960823.html
2011/10/4 Antóin Óg Ó Cuinneagáin <anthony.c...@gmail.com>:
> My next slide was gonna be solving all the warnings and moving forward
> with the default 'template' of
>
> #include <stdio.h>
>
> int main(){
> return 0; //for success
> }
>
> No nasty non standard from me I assure you :-)
>
> On Tue, Oct 4, 2011 at 5:43 PM, Duncan Thomas <duncan...@gmail.com> wrote:
>>
>> A link I usually pass around when looking at why main is 'int main(int
>> argc, char *argv[])'
>> http://users.aber.ac.uk/auj/voidmain.shtml
>>
>> I've also a rant on why casting the return value of malloc is always
>> the wrong thing to do somewhere, which I'll try to dig out
>>
>> 2011/10/4 Antóin Óg Ó Cuinneagáin <anthony.c...@gmail.com>:
>> > Very basic and the going is slow but will get there eventually
>> > https://docs.google.com/present/edit?id=0AZNgFR-wWJahYWpnbnp0ZGo5OHc0XzQwZnFwcXZ6Z3Q&hl=en_US
>> >
>>
>>
>>
>> --
>> Duncan Thomas
>
--
Duncan Thomas