From: Liche Newsgroups: comp.os.msdos.djgpp Subject: Bug in DJGPP? Date: Sun, 05 Oct 1997 21:34:06 +0800 Organization: New Silkera Network Lines: 32 Message-ID: <3437974D.E060AD2A@mail.linkease.com.tw> NNTP-Posting-Host: ts109.tp.silkera.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I use DJGPP v2.01, with RHIDE 1.4. When I compile this code: #include short counter() { auto short count; count ++; cout << count << " "; return 0; } int main() { short i; for (i = 0; i < 10; i ++) counter(); return 0; } This is displayed: 1 2 3 4 5 6 7 8 9 10 This happens everytime. Shouldn't the values returned be random? If I change auto short count; with auto short count = 20; , however, this is displayed: 21 22 23 24 25 26 27 28 29 30 Is this a problem with me, DJGPP, or RHIDE? Thanx