i am new into coding, and im trying to make a code that saves names, but when i run it, it only saves the first letter of the input, idk what i did wrong the languaje is cpp, and this is the code
#include <iostream>
using namespace std;
int main() {
int cv;
cout<<"Cuantas personas van a participar? "<< endl;
cin>> cv ;
char nombres[cv]{};
for(int x = 1; x<=cv; x++){
cin>>nombres[x];
cout<<nombres[x]<< endl;
}
return 0;
}