From: Neil Roy Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with variables Date: Wed, 13 May 1998 17:01:42 -0400 Organization: Pretty bad, but improving. ;) Lines: 31 Message-ID: <355A0A36.D105F717@sprint.ca> References: <3553258D DOT 5C54 AT bergen DOT mail DOT telia DOT com> Reply-To: royn AT usa DOT net NNTP-Posting-Host: hme1-2.news.sprint.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cache-Post-Path: michelob!unknown AT spc-isp-kgn-uas-01-35 DOT sprint DOT ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk You trying to assign an integer to a character variable. char A; //char variable, holds one character char B; // "" "" A=45; //Assigning integer to character variable If you want A to be an integer you should have int A; // (instead of char A) this would solve this problem. John Kismul wrote: > Hi > > I've got a problem with using variables in my programs. > Sometimes when I try to access a variable, my program will access > another variable instead. > > char A > char B > > A = 45; This will set both A and B to 45. > > It doesn't happen with every variable I use, only some of them. > The compiler I'm using is PGCC 1.0.1