Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class MainProgram {
- public:
- MainProgram(std::string sentence) : m_sentence(sentence){ };
- void execute();
- private:
- std::string m_sentence;
- };
- void MainProgram::execute() {
- std::cout << this->m_sentence << std::endl;
- }
- int main(int argc, char** argv)
- {
- auto program = new MainProgram("Hello, world!");
- program->execute();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement