fork download
  1.  
  2. class star
  3. {
  4. public:
  5. int x;
  6. int y;
  7. star(int xin, int yin)
  8. {
  9. x=xin;
  10. y=yin;
  11. }
  12. };
  13.  
  14. class collection
  15. {
  16. public:
  17. int x;
  18. collection()
  19. {
  20. x=0;
  21. }
  22. star starArray[20];
  23. };
  24.  
  25. collection CollOfStars();
  26.  
  27. int main()
  28. {
  29. return 0;
  30. }
  31.  
Compilation error #stdin compilation error #stdout 0s 3336KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor ‘collection::collection()’:
prog.cpp:19:5: error: no matching function for call to ‘star::star()’
     {
     ^
prog.cpp:19:5: note: candidates are:
prog.cpp:7:5: note: star::star(int, int)
     star(int xin, int yin)
     ^
prog.cpp:7:5: note:   candidate expects 2 arguments, 0 provided
prog.cpp:2:7: note: constexpr star::star(const star&)
 class star
       ^
prog.cpp:2:7: note:   candidate expects 1 argument, 0 provided
prog.cpp:2:7: note: constexpr star::star(star&&)
prog.cpp:2:7: note:   candidate expects 1 argument, 0 provided
stdout
Standard output is empty