Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. class Cat
  2. {
  3. private:
  4. char m_Name;
  5. public:
  6. Cat() {}
  7. void NameMe(char n)
  8. {
  9. m_Name = n;
  10. }
  11. };
  12.  
  13. int main()
  14. {
  15. Cat Cats[26];
  16. int i = 0;
  17. while (i < 26)
  18. {
  19. if (i % 2 == 0)
  20. {
  21. Cats[i].NameMe(i + 65);
  22. }
  23. else
  24. {
  25. Cats[i].NameMe(i + 97);
  26. }
  27. i++;
  28. }
  29. system("pause");
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement