Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //private使用
- #include <iostream>
- using namespace std;
- class c1
- {
- public:
- double a=1;
- int turna(){return a; };
- int turnb(){return b; };
- private:
- int c=3,b=2;
- int turnc(){return c; };
- };
- int main()
- {
- c1 test;
- cout<<test.a<<endl;
- //cout<<test.b<<endl;
- cout<<test.turna()<<endl;
- cout<<test.turnb()<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment