Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!apple!agate!bionet!arisia!roo!xerox!barbarin From: barbarin@Xerox.com (Mike Barbarino) Newsgroups: comp.lang.c++ Subject: TC++ problem w/huge arrays of struct? Keywords: TC++; arrays; pointers; struct; Message-ID: <678@roo.UUCP> Date: 14 Dec 90 21:38:48 GMT Sender: news@parc.xerox.com Reply-To: barbarin@Xerox.com (Mike Barbarino) Organization: Xerox PARC Lines: 32 I'm having some problems with TC++ ... in particular with the following sort of thing: const DBSIZE = 31000; struct weights { unsigned long x; unsigned long y; }; long memsize; ... memsize = DBSIZE * sizeof(weights); weights huge *accumulator = (weight *)farmalloc(MEMSIZE); ... for (int j=0; jx = 255; if (accumulator->x != 255) .... ... } ... and so on... In the IDE, using the debugger, I can trace over the assignment of the '255' without a watch on accumulator->x showing a change. A check immediately after the assignment shows no change. By deleting an element in the structure (say y), recompiling, etc., the assignment works. What am I doing wrong? Thanks in advance...