Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- class entity
- {
- public:
- int x;
- void say_hello()
- {
- cout<<"hello";
- }
- };
- int main()
- {
- entity *e=new entity();
- e->say_hello();
- e->x=3;
- cout<<(*e).x<<endl;
- cout<<(e->x==(*e).x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement