I am confused regarding the definition of a valarray.
The constructor is listed as explicit valarray( std::size_t count );
So I assumed std::valarray<double> va(10); is a valid way of declaring an array.
The code declares a Student class, which takes an integer as one of the arguments and uses the integer, I assumed, in the same way as above.
However the warning message warning: narrowing conversion of ‘n’ from ‘int’ to ‘double’ inside { } [-Wnarrowing] appears
Can anybody suggest why the code below generates the warning messages?