View Single Post
Old 08-09-2012, 09:14 AM   #168
NuPogodi
Connoisseur
NuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the endNuPogodi knows the complete value of PI to the end
 
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
I should apologize for a stupid question, but I'm totally confused. When I compile the simplest code with command line arguments, say
Quote:
#include "stdio.h"
#include <stdlib.h>
int main(int argc, char **argv) {
int count;
printf ("This program was called with \"%s\".\n", argv[0]);
if (argc > 1)
for (count = 1; count < argc; count++)
printf("argv[%d] = %s\n", count, argv[count]);
else
printf("The command had no other arguments.\n");
return 0;
}
and then run the compiled executable (no matter, with or without arguments) I ever obtain the same output
Quote:
This program was called with "(null)".
The command had no other arguments.
Not to say about succeeding arguments, even the first one argv[0] is somewhere lost. May you reproduce such a bug in your kindle & tcc? Have you any ideas why it happens & what should i do to solve this problem?
Thanks for any suggestions.
PS. tcc => kindle-tcc-1.6a.tar.gz, kindle3 (fw 3.0.3)
NuPogodi is offline   Reply With Quote