I need to cin an n and then n sentences, but it skips over the first position (i=0). So i took the program apart and made it simpler but it doesn't work, why it skips 0? I'm loosing my mind.
#include <iostream>
#include <cstring>
using namespace std;
int main(){
int n;cin>>n;
for(int i=0;i<n;i++) {
cout<<i<<' ';
char p[255];
cin.getline(p, 255);
}
return 0;
}