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;
- };
- private:
- int c=3;
- int turnc(){return c;
- };
- };
- int main()
- {
- c1 test;
- cout<<test.a<<endl;
- //cout<<test.c<<endl;
- cout<<test.turna()<<endl;
- //cout<<test.turnc()<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment