fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct asters
  5. {
  6. private:
  7. size_t count;
  8. public:
  9. asters(size_t count=3):count(count) {}
  10. friend ostream &operator<<(ostream &s,const asters &p)
  11. {
  12. for(size_t i=0;i<p.count;++i) s<<'*';
  13. return s;
  14. }
  15. };
  16.  
  17. int main()
  18. {
  19. cout<<asters(7)<<"Ala ma kota"<<endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 4520KB
stdin
Standard input is empty
stdout
*******Ala ma kota