forked from GroupInCorner/ClassTest
31 lines
779 B
C++
31 lines
779 B
C++
#include <iostream>
|
||
#include <string>
|
||
using namespace std;
|
||
|
||
class GenshinImpact {
|
||
public:
|
||
string name;
|
||
int element;
|
||
|
||
void showPower() {
|
||
cout << "角色:" << name << endl;
|
||
cout << "元素力爆发!原神牛逼!" << endl;
|
||
cout << "风岩雷草水冰火,全图探索我做主!" << endl;
|
||
}
|
||
};
|
||
|
||
int main() {
|
||
GenshinImpact traveler;
|
||
traveler.name = "旅行者";
|
||
|
||
cout << "========================================" << endl;
|
||
cout << " 原神牛逼 " << endl;
|
||
cout << "========================================" << endl;
|
||
traveler.showPower();
|
||
|
||
cout << endl;
|
||
cout << "提瓦特大陆最强!YYDS!" << endl;
|
||
cout << "原神永远滴神!!!" << endl;
|
||
|
||
return 0;
|
||
} |