Xref: utzoo comp.lang.c:40066 comp.lang.c++:14089 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!psuvm!prd3 Organization: Penn State University Date: Friday, 14 Jun 1991 09:53:27 EDT From: Message-ID: <91165.095327PRD3@psuvm.psu.edu> Newsgroups: comp.lang.c,comp.lang.c++ Subject: array side-effect I have found a real stumper. Partial listing follows: ... 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 This last statement changes the value of CODE_MATRIX[26][1] from -9 to some large random number. Rows 1-25 are unchanged. CODE_MATRIX[26][0] and CODE_MATRIX[26][2] may also be affected but I forgot to check. I have tried '9' instead of "9" and I have used strcpy to replace the whole line. The problem persists. I am using Borland Turbo C++ on a 386Clone running DOS.