fork(1) download
  1. #include <iostream>
  2. using namespace std; // consider removing this line in serious projects
  3.  
  4. struct Movie {string Name; int yr;};
  5.  
  6. void printMovie (Movie);
  7.  
  8. int main() {
  9.  
  10. Movie Topmovie = {"Silent Voice", 2016};
  11.  
  12. Movie Topmovie2 = {"Baby Driver", 2017};
  13.  
  14. printMovie(Topmovie);
  15. printMovie(Topmovie2);
  16.  
  17. return 0;
  18. }
  19.  
  20. void printMovie (Movie printmv){
  21. cout << "A top movie is " << printmv.Name;
  22. cout << " Relased " << printmv.yr;
  23. }
Success #stdin #stdout 0.01s 5284KB
stdin
stdout
A top movie is Silent Voice Relased 2016A top movie is Baby Driver Relased 2017