Try declaring the pointer as a char, instead of an int.
Remember that the type of pointer is what it can point to. So an int cannot
point to a char variable for example.
Does that sound right to everyone?
Daniel
>From: "Raghunath Marella.S" <ms...@ya...>
>To: dev...@li...
>Subject: [Dev-C++] memory violation....
>Date: Sun, 9 Jun 2002 02:42:00 -0700 (PDT)
>
>Hi,
>
>I have been facing a simple but strange problem in my
>C++ code. I have declared an integer pointer and whose
>size has been fixed at a large value dynamically.
>Like...
>
>seneles = 1000,ncn = 6;
>int *EleTopo = new int[seneles*ncn];
>
>Once this block is filled with valid data, once those
>values are printed and observed they seem to be
>correct. But in between of the code, retrieving the
>same had returned some junk values for some of the
>indexes.
>
>I am not getting what could be the problem.
>Will any one please help me out in this.
>
>thanks in advance,
>
>regards,
>Raghunath
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup
>http://fifaworldcup.yahoo.com
>
>_______________________________________________________________
>
>Don't miss the 2002 Sprint PCS Application Developer's Conference
>August 25-28 in Las Vegas -
>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|