![](/img/trans.png)
[英]Why am I getting this R6030 Error when i'm constructing a std::string?
[英]Why am I getting a compiler error when I'm trying to print string return?
我认为这是一个重载运算符错误,但我不明白为什么它会假设我正在尝试使用重载运算符。
string Customer::getCustomerName()
{
return customerName;
}
string Customer::getCustomerLicense()
{
return customerLicense;
}
Date* Customer::getCustomerBirthday()
{
return customerBirthday;
}
void Customer::printCustomerObject()
{
cout << getCustomerName(); // No operator "<<" matches these operands
} ERROR CODE: E0349
我认为您没有包括标准的字符串标题。
#include <string>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.