this的用法 - 写c++时,用this指针指向字符串时报错
大家讲道理
大家讲道理 2017-04-17 11:48:43
0
1
298
    #include<iostream>
class father
{
public:
    char* name[16];
    int money;
    father(char* name,int money);
};
father::father(char*name,int money)
{
    this->name=name;
    this->money=money;
}

在vs2012中编写,倒数第二行指向name的的this下有红色浪线提示说“表达式必须是可修改的左值”,请问为什么不能这么写

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!