There is an array char *Names[] = { "Alexandr", "Kostya", "Roman" };
trying to make a random name function and write it to another array
int _tmain(int argc, _TCHAR* argv[]) { char *Empty[100]; char *Names[] = { "Alexandr", "Kostya", "Roman" }; for (int i = 0; i < 3; i++) { Empty[i] = Names[rand() % 3 + 1]; cout << Empty[i]; } return 0; }
But it gives an error. Tell me how to set? Thank you