How do I input multiple different strings(including spaces) and store them in a array? Also output them one by one.
I tried doing this:
int n;
** cin>>n;**
** char a[1000][1000];**
for(int i=0;i<n;i++)
** {**
** cin.getline(a[i],1000);**
}
for(int i=0;i<n;i++)
** {**
** cout<<a[i];**
} .
But this wont consider the space and treats them as different strings