[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: converting numbers



> If all you want is to convert to decimal, use this short C-program:
> #include <stdio.h>
> 
> void main(int argc, char **argv)
  ^^^^
This is undefined. main should return an int.

> {
>     while (*++argv) printf("%s == %i\n", *argv, strtol(*argv));
	exit(EXIT_SUCCESS);
> }

Matthew

-- 
Elen sila lumenn' omentielvo

matthew@debian.org,
Steward of the Cambridge Tolkien Society
Selwyn College Computer Support
http://www.cam.ac.uk/CambUniv/Societies/tolkien/
http://pick.sel.cam.ac.uk/


Reply to: