Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Arrow Member Selection Operator:
- This Operator let you acces stuff from classes through a process including pointers!
- Here is an example:
- #include <iostream>
- using namespace std;
- class randomClass
- {
- public:
- void printCrap()
- {
- cout << "Did someone say steak?" << endl;
- }
- };
- int main()
- {
- randomClass felixobject; //Declaring an object.
- randomClass *felixpointer = &felixobject; //Declaring the pointer as to an object. (something like that? -.-)
- felixpointer -> printCrap(); //Notice that you don't do felixpointer.printCrap();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement