Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MyString.h
- #include <iostream>
- class MyString
- {
- std::string m_pStr;
- public:
- MyString();
- MyString(std::string string);
- friend std::ostream& operator<<(std::ostream& os, const MyString& string);
- };
- //MyString.cpp
- #include <iostream>
- #include "MyString.h"
- std::ostream& operator<<(std::ostream& os, const MyString& string)
- {
- os << string.m_pStr;
- return os;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement