Xref: utzoo comp.lang.c:40081 comp.lang.c++:14106 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ysub!psuvm!kqs From: KQS@psuvm.psu.edu (Kevin Sullivan) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: array side-effect Message-ID: <91165.174358KQS@psuvm.psu.edu> Date: 14 Jun 91 21:43:58 GMT References: <91165.095327PRD3@psuvm.psu.edu> Organization: Penn State University Lines: 26 Two problems here: In article <91165.095327PRD3@psuvm.psu.edu>, says: >... >int CODE_MATRIX[26][25]; //global >char INMOD1[50][3]; //global >... >int mod_loop=0; //local >... >mod_loop++; >INMOD1[mod_loop][0]="9"; //mod_loop is 1 First: an array declared as a[SIZE] goes from a[0] to a[SIZE-1]; a[SIZE] is undefined (and in thic case points to the first element of the next array). second: "9" evaluates to a (const char *), not a char. But perhaps you meant '9', which is a char (actually an int). Kevin Sullivan BITNET: KQS@PSUVM Student Consultant - CAC INTERNET: kqs@vm.psu.edu Penn State University Old programmers don't die...they I don't speak for Penn State... just branch to a new address. Penn State doesn't speak for me.