|
|
stars[i] = new char[100];, you made stars[i] point to a plot of memory. When you then declared stars[i] = "Robert Redford";, you told stars[i] to look somewhere else. More specifically, to a read-only part of memory. If you want to mess with the values of stars[i], use strcpy_s(stars[i],100,"Robert Redford").