Feb 25, 2019 at 7:41pm UTC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
#include <string>
using namespace std;
int main()
{
int l;
cout << "enter number: " ;
cin >> l;
string* x= new string [n];
for (int i = 0; i < l; i++)
cin >> x[i];
for (int i = 0; i<l; i++)
cout << A[i] << endl;
}
Last edited on Feb 25, 2019 at 9:32pm UTC
Feb 25, 2019 at 7:50pm UTC
cout << B[i] << " " < C[i] << endl;
Have a real good look at this line. Count how many <
there are.
Feb 25, 2019 at 7:54pm UTC
Other problems with the code:
The last loop in main goes all the way up to n but the B and C arrays only have n/2 elements.
In Alternate_split you delete the A array and then you access elements from the array that you just deleted.