Skip to content

Instantly share code, notes, and snippets.

@Jack2
Created November 9, 2012 17:44
Show Gist options
  • Save Jack2/4047089 to your computer and use it in GitHub Desktop.
Save Jack2/4047089 to your computer and use it in GitHub Desktop.
[C++]class_example
#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