main.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // #include "char_test.hpp"
  2. // #include "process_bar.hpp"
  3. #include "functions.h"
  4. #include "try_class.hpp"
  5. int main()
  6. {
  7. // test_char();
  8. // rotate();
  9. // test_func();
  10. // int num;
  11. // std::cout << "Input a num to check if it's prime num:\n> ";
  12. // std::cin >> num;
  13. // printf(isPrimeNum(num)?"Yes\n":"No\n");
  14. //////////////////////
  15. // Reference parameter
  16. //
  17. // int a = 3, b = 87;
  18. // std::cout << "A is " << a << " and B is " << b << std::endl;
  19. // swap(a, b);
  20. // std::cout << "A is " << a << " and B is " << b << std::endl;
  21. // char c = 'c', d = 'd';
  22. // std::cout << "C is " << c << " and D is " << d << std::endl;
  23. // swap(c, d);
  24. // std::cout << "C is " << c << " and B is " << d << std::endl;
  25. ///////////////
  26. // Trying Class
  27. //
  28. YoutubeChannel gg("C++ tutorial", "Lzl", 0);
  29. gg.pub_video("C++ for beginners 1");
  30. gg.pub_video("C++ for beginners 2");
  31. gg.show_info();
  32. for (int subs=0; subs<98; subs++)
  33. {
  34. gg.subscribe();
  35. }
  36. gg.show_info();
  37. for (int unsubs=0; unsubs<15; unsubs++)
  38. {
  39. gg.unsubscribe();
  40. }
  41. gg.show_info();
  42. return 0;
  43. }