Bubble sort using only pointers and dynamic memory allocation
问题 I am trying to run Bubble Sort Technique using pointers and dynamic memory allocation, but the code doesn't seem to run (eclipse crashes). Please help. I am posting the code below: #include<iostream> using namespace std; void sort(int *); //=========================================== int main() { int *a = new int[5]; int *c = a; cout << "Enter the numbers\n"; for(int i = 0; i < 5; i++) { cin >> *a; a++; } a = a - 4; sort(a); cout << c; cout<<"\nSorting complete"; cout<<"\n Array after sorting