Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Cat
- {
- private:
- char m_Name;
- public:
- Cat() {}
- void NameMe(char n)
- {
- m_Name = n;
- }
- };
- int main()
- {
- Cat Cats[26];
- int i = 0;
- while (i < 26)
- {
- if (i % 2 == 0)
- {
- Cats[i].NameMe(i + 65);
- }
- else
- {
- Cats[i].NameMe(i + 97);
- }
- i++;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement