在C++ premier plus中,在定义类的构造函数时,构造函数的形参中包含一个字符串与一个浮点数。
类名为BankAccount,
书中显示,其构造函数有两种定义方式:
1:
BankAccount::BankAccount(const char * client, double bal){...}
2:
BankAccount::BankAccount(const std::string & client, double bal){...}
请问这两处的const char * client与const std::string & client有什么异同?
可以把第一种写为const char & client 吗?