What is the difference between the line that does not compile and the line that does compile? The line that does not compile gives this warning: deprecated conversion from string constant to 'char*'
Also, I'm aware casting (char *) on the string being passed in to the function would solve the problem, but I would like to understand why that's even necessary when the 2nd line compiles just fine.
class Student {
  public:
    Student( char name[] ) {
    }
}
int main() {
  Student stud( "Kacy" ); //does not compile
  char name[20] = "Kacy";   //compiles just fine
}
 
     
     
    