Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef COW_H_
- #define COW_H_
- #include <string>
- class Cow
- {
- public:
- Cow(std::string);
- virtual ~Cow();
- std::string Process();
- private:
- std::string m_phrase;
- };
- #endif /* COW_H_ */
- ___
- #include <iostream>
- #include <string>
- #include "Cow.h"
- using namespace std;
- Cow (string phrase)
- {
- m_phrase = phrase;
- }
- string Cow::Process() //Cuts the string to 40 char lines
- {
- int i;
- i = m_phrase.size();
- if (i > 40)
- {
- cout << "More than 40" << endl;
- }
- else
- {
- cout << "Less than 40" << endl;
- }
- return 0;
- }
- Cow::~Cow()
- {
- // TODO Auto-generated destructor stub
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement