X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "bpascal123 AT googlemail DOT com" Newsgroups: comp.os.msdos.djgpp Subject: Compile a simple C code with getchar and i get : from (null):4294967295 Date: Sat, 22 Aug 2009 08:17:29 -0700 (PDT) Organization: http://groups.google.com Lines: 59 Message-ID: <0e105b0f-b8ec-4c77-8b84-20761536eefa@k30g2000yqf.googlegroups.com> NNTP-Posting-Host: 78.250.248.126 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1250954265 14067 127.0.0.1 (22 Aug 2009 15:17:45 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sat, 22 Aug 2009 15:17:45 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: k30g2000yqf.googlegroups.com; posting-host=78.250.248.126; posting-account=qke9lAkAAAC0GKPOVdICgk-QxjHzvSsI User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I have started learning how to programm 3-4 months ago with little to non-experience in computer litterature and languages... My question is also active in : http://groups.google.com/group/comp.lang.c/browse_thread/thread/40d8cf931084b9de/39eb474e02108c5b#39eb474e02108c5b But to resume it, it's about getchar. When I want to compile the code below i get : from (null):4294967295 http://c-faq.com/~scs/cclass/notes/sx6b.html #include /* copy input to output */ main() { int c; c = getchar(); while(c != EOF) { putchar(c); c = getchar(); } return 0; } As i'm learning to program, i compile both in linux and windows. So i decided to check if other files i though were working on both plateforms would work but it seems all files with a simple getchar() function don't work in windows (i get from (null):4294967295) but do work in linux (i don't know how i didn't notice it). And it seems all file with a simple call to getchar and another call to wipe '\n' out work in windows and linux as well. Someone in the c.comp.lang discussion is saying : Are you really saying that you get the above message *at compile time*? (me: yes : gcc myfile.c -o myfile.exe) And you see that message when you compile the exact code that you posted earlier, but not when you compile other C programs? (me:very strange, but yes!) If so, you have a serious problem with your compiler. (me : what problem??? Should i reinstall ? ) Thanks, Pascal