Where T is a type and e is an expression (of some type other than T),
T x(e) ; or T x{e} is 'direct initialization'
T x = e ; is 'copy initialization'.
1 2 3 4 5
struct A { explicitoperatorint() const { return 0 ; } } ;
A a ;
int x(a) ; // fine; direct initialization, 'a' explicitly converted to int
int y = a ; // *** error; copy initialization, no implicit conversion from 'a' to int
There is no practical difference between the two unless a user defined type is involved.
The only way of something to not be correct C++ is if it doesn't conform to the standard.
all of those 3 are valid, the first two are C-Strings and the latter is a C++ string, so if you want to right 'as little C as possible' the last one is 'more correct'
@Zephilinox
...all of those 3 are valid, the first two are C-Strings and the latter is a C++ string,...
The first is a character array. The second is a pointer to char that shall be declared as a pointer to const char. And the third is an object of type std::string.