http://i.hizliresim.com/1EN2DB.png
helpp!! case 2
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << "Dizi boyutu: ";
int* psize = new int; // heap kullandigim yer
cin >> *psize;
cout << "Dizi basariyla olusturuldu.\n";
int secenek;
cout << endl << "Islemler" << endl;
cout << "1. Diziyi Yazdir" << endl;
cout << "2. Yer Degistir" << endl;
cout << "3. Cikis" << endl << ">> ";
cin >> secenek;
switch(secenek) {
case 1: {
for (int i = 0; i < *psize; i++)
{
cout << "[" << i << "] -> ";
cout << &psize+i << "\n";
}
delete psize;
}
break;
case 2: {
break;
}
case 3: {
break;
}
default: {
cout << "!! Listede verilen sayilari kullaniniz. !!\n";
}
}
}
Last edited on
you should use dynamic array https://www.youtube.com/watch?v=PocJ5jXv8No
Last edited on
Yes, I have difficulty even if I know it..
The image looks like you want to swap memory locations. However, array is consecutive; no such swapping.
You can swap the values. std::swap( psize[3], psize[4] );