fork download
  1. #include <iostream>
  2.  
  3. #define MAX_CLASS_SIZE 10
  4.  
  5. struct Name {
  6.  
  7. char fname[15];
  8. char lname[15];
  9.  
  10. };
  11.  
  12. struct Info {
  13.  
  14. int grade;
  15. char phone[15];
  16.  
  17. };
  18.  
  19. struct Mark {
  20.  
  21. int math;
  22. int sci;
  23. int eng;
  24.  
  25. };
  26.  
  27. struct Student {
  28.  
  29. Name n;
  30. Info i;
  31. Mark m;
  32.  
  33. };
  34.  
  35. int main()
  36. {
  37.  
  38. Student class_list[MAX_CLASS_SIZE] = {
  39. {
  40. // No Errors here
  41. {"Bob", "Smith"},
  42. {11, "519-688-5168"},
  43. {88, 75, 78}
  44. }
  45. };
  46.  
  47. }
  48.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty