Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <functional>
- using namespace std;
- class RonPaul {
- public:
- RonPaul() { //constructor
- cout << "SPRING BREAK" << endl;
- };
- string HAPPENING() { //gay, slow way to define a function
- return "YOU COULD HAVE LISTENED";
- }
- function<string(void)> not_happening = []() { //fast, efficent, functional way to define a function.
- return "Okay I guess we didn't need to listen";
- };
- ~RonPaul() { //destructor
- cout << "this party sucks" << endl;
- };
- };
- int main(int argc, char **argv){
- RonPaul bitcoins;
- cout << bitcoins.HAPPENING();
- cout << "\n";
- cout << bitcoins.not_happening();
- cout << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement