   Memory Overwrite Problems
  My program is overwriting some floats. I set up some breaks in .NET to tell me when the problematic var was being changed, and it happens when some OTHER variable is assigned some value... so the 2nd var is affecting the contents of the 1st one. I was always under the impression that floats and ints and basic arrays were isolated from each other, and this machine has more than enough memory for this application.What do I do about this? I don't know how to control where the compiler assigns memory blocks, so what other options do I have?Thanks,Michael   
  Hi! Are you dealing with pointers, arrays, '&' operator, casting, ar any other bits/memory manipulation ?Would you mind posting some code, so that someone can figure it out ?CheersJanta   ;  I can show you some general code, because I've been messing with it some and while the problem isn't gone it's not the same code from before:/* GLOBALS */float x_1; <---this is the var that's manipulatedstruct menunode{float tlc_x, tlc_y;};menunode menus[1];/* from here on down it's in the main drawing part of the program, and it gets data from those 3 floats */and when I set up the break to watch x_1, it tripped when menus[1]......crap I think I just realized what the problem is. I'm calling menus[1] and it should be menus[0]. Well I hope you didn't think this a waste of time but I'd feel wonky if I just erased all this stuff and said "problem fixed" or something. So... false alarm I guess. Thanks!;Quote:Original post by jantaHi! Are you dealing with pointers, arrays, '&' operator, casting, ar any other bits/memory manipulation ?Headshot ! :)