Created
November 9, 2012 17:44
-
-
Save Jack2/4047089 to your computer and use it in GitHub Desktop.
[C++]class_example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class superstar | |
{ | |
public: | |
char skill; | |
int passion; | |
int communication; | |
}; | |
int main() | |
{ | |
superstar jack2; | |
jack2.skill = 'A'; | |
jack2.passion = 999; | |
jack2.communication = 999; | |
cout << "Jack2's skill will be "<< jack2.skill << "Lv" << endl; | |
cout << "Jakc2's passion is " << jack2.passion << endl; | |
cout << "Jack2's communication is " << jack2.communication << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment