fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. struct Movie {
  6. string title; // name of the movie
  7. string rating; // G, PG, PG-13, R, NC-17, NR
  8. int stars; // numbers of stars 0-4
  9. };
  10.  
  11. int main ()
  12. {
  13. Movie m1; // create an instance of a Movie
  14.  
  15. cout << "The movie title is " << m1.title <<
  16. "and its rating is " << m1.rating <<
  17. "and critics gave it " << m1.stars << " stars" << endl;
  18.  
  19. return(0);
  20. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
The movie title is and its rating is and critics gave it -280153280 stars