I'm using C++ Form Application in Visual Studio 2010. My question may be weird and funny for you but at first, I have to say that I'm not beginner in C++ :). I defined a new two dimentional array. like this "static int dizi[26][26];" I want to change the value when I clicked the button1. For example, I can change as dizi[2][3]=1. But I couldn't change like in this code. dizi[a][b]=1 didn't happen. Error is... "access violation exception was unhandled. attempted to read or write protected memory. this is often an indication that other memory is corrupt."
I don't use zeroth variable here.So, It started from 1. My problem is variable can't be changed.I can't assign a value to variable. I have to use 'ogrenci[i].ders[j]'s index for dizi array in this code. It's really weird. I tried lots of things. Please help. Thank you..
Well you're definitely going to have problems if you declare a 2d array as:
dizi[26][26]
and you intend to iterate through it from index 1 to 26. This because in C++ we almost always count from zero [0]. Why do you want to try and change the rules?
So to iterate through any array of 26 you would need to start at index zero [0] and finish at [25].