Ok. I deleted my previous post and tried this again.
Code:
#include <iostream>
#include <conio.h>
int main()
{
char name[200][30];
for (int i = 0; i < 10; i++)
{
std::cout << "Enter your name: ";
std::cin.getline(name[i], 30, '\n');
}
for (int i = 0; i < 10; i++)
{
std::cout << name[i] << "\n";
}
getch();
return(0);
}
That'll do what you want. Feel free to remove the getch(), and the second for loop, as well as updating the "i < 10" to be what you want them to be. I tested it with 10 because I REALLY didn't want to type 200 names.. it works with 10.