X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: What's going on Date: 22 Jan 2002 13:54:08 GMT Organization: Aachen University of Technology (RWTH) Lines: 40 Message-ID: References: <009d01c1a2c2$d714bc20$6e0510ac AT et30> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1011707648 8625 137.226.32.75 (22 Jan 2002 13:54:08 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 22 Jan 2002 13:54:08 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jade wrote: > I put this as an example because it makes the same thing that the > program I'm working on. I compile both with the following command > line > gcc -o > and the compiler didn't told me a single warning. Of course it didn't --- you didn't ask for any warnings. A nd there's a large part of your problem already. Almost always, but definitely when you're looking for the source of some problem, you *want* to ask for a rather high warning level. I.e. whenever things seem fishy, or even better yet right from the beginning, use gcc -Wall -O2 -g -o to compile your programs. Just see what this would have told you about your program: tt.c: In function `main': tt.c:5: warning: format argument is not a pointer (arg 2) tt.c:7: warning: format argument is not a pointer (arg 2) tt.c:8: warning: control reaches end of non-void function Those warnings about the format argument not being a pointer point exactly towards your problem: argv's type is wrong, so now argv[0] isn't a pointer to char, as it should be, but rather a char. > I'm working on a pentium adn running gcc under windows 2000 pro. Please be aware that for Win2K pro, you need a special version of DJGPP to avoid the new bugs Microsoft once more managed to put into the new version of it's "professional" operating system. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.