fork download
  1. #include <iostream>
  2.  
  3. int main()
  4.  
  5. {
  6.  
  7. //Below are two strings that can hold several char variables
  8.  
  9. char todaysMonth[10];
  10. char lastMonthOfSchool[10];
  11.  
  12. USHORT todaysDate;
  13. USHORT numberOfSchoolDaysLeftUntilSummer;
  14.  
  15. //Below are variables where the month will be written in number //form.
  16. //The char variables are converted into integers so numerical //calculations on the months can be performed.
  17.  
  18. short numberMonth = 0;
  19. short numberLastMonth = 0;
  20. short monthsLeft;
  21.  
  22. std::cout << "What is the month of today\t?";
  23. std::cin >> todaysMonth;
  24. std::cout << "\nWhat month does school end?\t";
  25. std::cin << lastMonthOfSchool;
  26.  
  27.  
  28.  
  29. switch (todaysMonth)
  30. {
  31. case january:
  32. numberMonth + 1;
  33. break;
  34. case february:
  35. numberMonth + 2;
  36. break;
  37. case march:
  38. numberMonth + 3;
  39. break;
  40. case april:
  41. numberMonth + 4;
  42. break;
  43. case may:
  44. numberMonth + 5;
  45. break;
  46. case june:
  47. numberMonth + 6;
  48. break;
  49. case july:
  50. numberMonth - 6;
  51. break;
  52. case august:
  53. numberMonth - 5;
  54. break;
  55. case september:
  56. numberMonth - 4;
  57. break;
  58. case october:
  59. numberMonth - 3;
  60. break;
  61. case november
  62. numberMonth - 2;
  63. break;
  64. case december:
  65. numberMonth - 1;
  66. break;
  67. case default:
  68. std::cout << "\nError: Please try again and enter a month without any capital letters";
  69. }
  70.  
  71.  
  72. switch (lastMonthOfSchool)
  73. {
  74. case january:
  75. numberLastMonth + 1;
  76. break;
  77. case february:
  78. numberLastMonth + 2;
  79. break;
  80. case march:
  81. numberLastMonth + 3;
  82. break;
  83. case april:
  84. numberLastMonth + 4;
  85. break;
  86. case may:
  87. numberLastMonth + 5;
  88. break;
  89. case june:
  90. numberLastMonth + 6;
  91. break;
  92. case july:
  93. numberLastMonth - 6;
  94. break;
  95. case august:
  96. numberLastMonth - 5;
  97. break;
  98. case september:
  99. numberLastMonth - 4;
  100. break;
  101. case october:
  102. numberLastMonth - 3;
  103. break;
  104. case november
  105. numberLastMonth - 2;
  106. break;
  107. case december:
  108. numberLastMonth - 1;
  109. break;
  110. case default:
  111. std::cout << "\nError: Please try again and enter a month without any capital letters.";
  112. }
  113.  
  114. //The statement below calculates how many months are left
  115.  
  116. numberLastMonth - numberMonth = monthsLeft;
  117.  
  118. //If the statement above assigns the variable monthsLeft a negative //number, then the statement below makes it the correct, positive //number
  119.  
  120. if (monthsLeft < 0)
  121. {
  122. switch (monthsLeft)
  123. {
  124. case = -1:
  125. monthsLeft + 2;
  126. break;
  127. case = -2:
  128. monthsLeft + 4;
  129. break;
  130. case = -3:
  131. monthsLeft + 6;
  132. break;
  133. case = -4:
  134. monthsLeft + 8;
  135. break;
  136. case = -5:
  137. monthsLeft + 10;
  138. break;
  139. case = -6:
  140. monthsLeft + 12;
  141. break;
  142. case = -7:
  143. monthsLeft + 14;
  144. break;
  145. case = -8:
  146. monthsLeft + 16;
  147. break;
  148. case = -9:
  149. monthsLeft + 18;
  150. break;
  151. case = -10:
  152. monthsLeft + 20;
  153. break;
  154. case = -11:
  155. monthsLeft + 22;
  156. break;
  157. case = -12:
  158. monthsLeft + 24;
  159. break;
  160. case default:
  161. std::cout << "\nError: Please try again and enter a month.";
  162. break;
  163. }
  164. }
  165.  
  166. //These are the variables that store today's date and the date of the //last day of school
  167.  
  168. USHORT todaysDate;
  169. USHORT lastDate;
  170. int daysLeftEstimate;
  171.  
  172. if (monthsLeft<=2)
  173. {
  174. std::cout << "\nEnter in today's date\t";
  175. std::cin >> todaysDate;
  176.  
  177. std::cout << "\nEnter in the date of the last day of school\t";
  178. std::cin >> lastDate;
  179.  
  180. monthsLeft * 20 = daysLeftEstimate;
  181. lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
  182. }
  183.  
  184. if (monthsLeft <= 5 && monthsLeft >= 3)
  185. {
  186. std::cout << "\nEnter in today's date\t";
  187. std::cin >> todaysDate;
  188.  
  189. std::cout << "\nEnter in the date of the last day of school\t";
  190. std::cin >> lastDate;
  191.  
  192. monthsLeft * 18.8 = daysLeftEstimate;
  193. lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
  194. }
  195.  
  196. if (monthsLeft = 6)
  197. {
  198. std::cout << "\nEnter in today's date\t";
  199. std::cin >> todaysDate;
  200.  
  201. std::cout << "\nEnter in the date of the last day of school\t";
  202. std::cin >> lastDate;
  203.  
  204. monthsLeft * 18.17 = daysLeftEstimate;
  205. lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
  206. }
  207.  
  208. if (monthsLeft = 7)
  209. {
  210. std::cout << "\nEnter in today's date\t";
  211. std::cin >> todaysDate;
  212.  
  213. std::cout << "\nEnter in the date of the last day of school\t";
  214. std::cin >> lastDate;
  215.  
  216. monthsLeft * 17.71 = daysLeftEstimate;
  217. lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
  218. }
  219.  
  220. if (monthsLeft = 8)
  221. {
  222. std::cout << "\nEnter in today's date\t";
  223. std::cin >> todaysDate;
  224.  
  225. std::cout << "\nEnter in the date of the last day of school\t";
  226. std::cin >> lastDate;
  227.  
  228. monthsLeft * 18.25 = daysLeftEstimate;
  229. lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
  230. }
  231.  
  232. std::cout << "\nThere are: " << numberOfSchoolDaysLeftUntilSummer << "days left until it is summer time. \n Estimation: \t" << daysLeftEstimation;
  233. return 0;
  234.  
  235. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
april
june
20
3
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12:1: error: ‘USHORT’ was not declared in this scope
 USHORT todaysDate;
 ^
prog.cpp:12:8: error: expected ‘;’ before ‘todaysDate’
 USHORT todaysDate;
        ^
prog.cpp:13:8: error: expected ‘;’ before ‘numberOfSchoolDaysLeftUntilSummer’
 USHORT numberOfSchoolDaysLeftUntilSummer;
        ^
prog.cpp:25:10: error: no match for ‘operator<<’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘char [10]’)
 std::cin << lastMonthOfSchool; 
          ^
prog.cpp:25:10: note: candidates are:
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:602:5: note: template<class _CharT, class _Traits, class _Tp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&)
     operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
     ^
/usr/include/c++/4.8/ostream:602:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:548:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)
     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
     ^
/usr/include/c++/4.8/ostream:548:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:543:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)
     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
     ^
/usr/include/c++/4.8/ostream:543:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:530:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
     ^
/usr/include/c++/4.8/ostream:530:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/ostream:609:0,
                 from /usr/include/c++/4.8/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/ostream.tcc:321:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)
     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
     ^
/usr/include/c++/4.8/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:513:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)
     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
     ^
/usr/include/c++/4.8/ostream:513:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:493:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)
     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
     ^
/usr/include/c++/4.8/ostream:493:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:488:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
     ^
/usr/include/c++/4.8/ostream:488:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:482:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
     operator<<(basic_ostream<char, _Traits>& __out, char __c)
     ^
/usr/include/c++/4.8/ostream:482:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:476:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
     ^
/usr/include/c++/4.8/ostream:476:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:471:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
     ^
/usr/include/c++/4.8/ostream:471:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2753:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2753:5: note:   template argument deduction/substitution failed:
prog.cpp:25:13: note:   ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
 std::cin << lastMonthOfSchool; 
             ^
prog.cpp:29:20: error: switch quantity not an integer
 switch (todaysMonth)
                    ^
prog.cpp:31:6: error: ‘january’ was not declared in this scope
 case january:
      ^
prog.cpp:32:18: warning: statement has no effect [-Wunused-value]
      numberMonth + 1; 
                  ^
prog.cpp:34:6: error: ‘february’ was not declared in this scope
 case february:
      ^
prog.cpp:35:18: warning: statement has no effect [-Wunused-value]
      numberMonth + 2; 
                  ^
prog.cpp:37:6: error: ‘march’ was not declared in this scope
 case march:
      ^
prog.cpp:38:18: warning: statement has no effect [-Wunused-value]
      numberMonth + 3; 
                  ^
prog.cpp:40:6: error: ‘april’ was not declared in this scope
 case april:
      ^
prog.cpp:41:18: warning: statement has no effect [-Wunused-value]
      numberMonth + 4; 
                  ^
prog.cpp:43:6: error: ‘may’ was not declared in this scope
 case may:
      ^
prog.cpp:44:18: warning: statement has no effect [-Wunused-value]
      numberMonth + 5; 
                  ^
prog.cpp:46:6: error: ‘june’ was not declared in this scope
 case june:
      ^
prog.cpp:47:18: warning: statement has no effect [-Wunused-value]
      numberMonth + 6; 
                  ^
prog.cpp:49:6: error: ‘july’ was not declared in this scope
 case july:
      ^
prog.cpp:50:18: warning: statement has no effect [-Wunused-value]
      numberMonth - 6; 
                  ^
prog.cpp:52:6: error: ‘august’ was not declared in this scope
 case august:
      ^
prog.cpp:53:18: warning: statement has no effect [-Wunused-value]
      numberMonth - 5; 
                  ^
prog.cpp:55:6: error: ‘september’ was not declared in this scope
 case september:
      ^
prog.cpp:56:18: warning: statement has no effect [-Wunused-value]
      numberMonth - 4; 
                  ^
prog.cpp:58:6: error: ‘october’ was not declared in this scope
 case october:
      ^
prog.cpp:59:18: warning: statement has no effect [-Wunused-value]
      numberMonth - 3; 
                  ^
prog.cpp:61:6: error: ‘november’ was not declared in this scope
 case november
      ^
prog.cpp:62:6: error: expected ‘:’ before ‘numberMonth’
      numberMonth - 2; 
      ^
prog.cpp:62:18: warning: statement has no effect [-Wunused-value]
      numberMonth - 2; 
                  ^
prog.cpp:64:6: error: ‘december’ was not declared in this scope
 case december:
      ^
prog.cpp:65:18: warning: statement has no effect [-Wunused-value]
      numberMonth - 1; 
                  ^
prog.cpp:67:7: error: expected primary-expression before ‘default’
  case default:
       ^
prog.cpp:67:7: error: expected ‘:’ before ‘default’
prog.cpp:72:26: error: switch quantity not an integer
 switch (lastMonthOfSchool)
                          ^
prog.cpp:74:6: error: ‘january’ was not declared in this scope
 case january:
      ^
prog.cpp:75:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth + 1; 
                      ^
prog.cpp:77:6: error: ‘february’ was not declared in this scope
 case february:
      ^
prog.cpp:78:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth + 2; 
                      ^
prog.cpp:80:6: error: ‘march’ was not declared in this scope
 case march:
      ^
prog.cpp:81:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth + 3; 
                      ^
prog.cpp:83:6: error: ‘april’ was not declared in this scope
 case april:
      ^
prog.cpp:84:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth + 4; 
                      ^
prog.cpp:86:6: error: ‘may’ was not declared in this scope
 case may:
      ^
prog.cpp:87:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth + 5; 
                      ^
prog.cpp:89:6: error: ‘june’ was not declared in this scope
 case june:
      ^
prog.cpp:90:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth + 6; 
                      ^
prog.cpp:92:6: error: ‘july’ was not declared in this scope
 case july:
      ^
prog.cpp:93:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth - 6; 
                      ^
prog.cpp:95:6: error: ‘august’ was not declared in this scope
 case august:
      ^
prog.cpp:96:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth - 5; 
                      ^
prog.cpp:98:6: error: ‘september’ was not declared in this scope
 case september:
      ^
prog.cpp:99:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth - 4; 
                      ^
prog.cpp:101:6: error: ‘october’ was not declared in this scope
 case october:
      ^
prog.cpp:102:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth - 3; 
                      ^
prog.cpp:104:6: error: ‘november’ was not declared in this scope
 case november
      ^
prog.cpp:105:6: error: expected ‘:’ before ‘numberLastMonth’
      numberLastMonth - 2; 
      ^
prog.cpp:105:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth - 2; 
                      ^
prog.cpp:107:6: error: ‘december’ was not declared in this scope
 case december:
      ^
prog.cpp:108:22: warning: statement has no effect [-Wunused-value]
      numberLastMonth - 1; 
                      ^
prog.cpp:110:7: error: expected primary-expression before ‘default’
  case default:
       ^
prog.cpp:110:7: error: expected ‘:’ before ‘default’
prog.cpp:116:31: error: lvalue required as left operand of assignment
 numberLastMonth - numberMonth = monthsLeft;
                               ^
prog.cpp:124:16: error: expected primary-expression before ‘=’ token
           case = -1:
                ^
prog.cpp:125:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 2;  
                           ^
prog.cpp:127:16: error: expected primary-expression before ‘=’ token
           case = -2: 
                ^
prog.cpp:128:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 4;
                           ^
prog.cpp:130:16: error: expected primary-expression before ‘=’ token
           case = -3:
                ^
prog.cpp:131:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 6;
                           ^
prog.cpp:133:16: error: expected primary-expression before ‘=’ token
           case = -4:
                ^
prog.cpp:134:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 8;
                           ^
prog.cpp:136:16: error: expected primary-expression before ‘=’ token
           case = -5:
                ^
prog.cpp:137:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 10; 
                           ^
prog.cpp:139:16: error: expected primary-expression before ‘=’ token
           case = -6:
                ^
prog.cpp:140:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 12;
                           ^
prog.cpp:142:16: error: expected primary-expression before ‘=’ token
           case = -7:
                ^
prog.cpp:143:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 14;
                           ^
prog.cpp:145:16: error: expected primary-expression before ‘=’ token
           case = -8: 
                ^
prog.cpp:146:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 16;
                           ^
prog.cpp:148:16: error: expected primary-expression before ‘=’ token
           case = -9: 
                ^
prog.cpp:149:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 18;
                           ^
prog.cpp:151:16: error: expected primary-expression before ‘=’ token
           case = -10: 
                ^
prog.cpp:152:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 20; 
                           ^
prog.cpp:154:16: error: expected primary-expression before ‘=’ token
           case = -11: 
                ^
prog.cpp:155:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 22; 
                           ^
prog.cpp:157:16: error: expected primary-expression before ‘=’ token
           case = -12: 
                ^
prog.cpp:158:27: warning: statement has no effect [-Wunused-value]
                monthsLeft + 24; 
                           ^
prog.cpp:160:16: error: expected primary-expression before ‘default’
           case default:
                ^
prog.cpp:160:16: error: expected ‘:’ before ‘default’
prog.cpp:168:8: error: expected ‘;’ before ‘todaysDate’
 USHORT todaysDate;
        ^
prog.cpp:169:8: error: expected ‘;’ before ‘lastDate’
 USHORT lastDate;
        ^
prog.cpp:175:13: error: ‘todaysDate’ was not declared in this scope
 std::cin >> todaysDate;
             ^
prog.cpp:178:13: error: ‘lastDate’ was not declared in this scope
 std::cin >> lastDate;
             ^
prog.cpp:180:17: error: lvalue required as left operand of assignment
 monthsLeft * 20 = daysLeftEstimate;
                 ^
prog.cpp:181:56: error: ‘numberOfSchoolDaysLeftUntilSummer’ was not declared in this scope
 lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
                                                        ^
prog.cpp:187:13: error: ‘todaysDate’ was not declared in this scope
 std::cin >> todaysDate;
             ^
prog.cpp:190:13: error: ‘lastDate’ was not declared in this scope
 std::cin >> lastDate;
             ^
prog.cpp:192:19: error: lvalue required as left operand of assignment
 monthsLeft * 18.8 = daysLeftEstimate;
                   ^
prog.cpp:193:56: error: ‘numberOfSchoolDaysLeftUntilSummer’ was not declared in this scope
 lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
                                                        ^
prog.cpp:196:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 if (monthsLeft = 6)
                   ^
prog.cpp:199:13: error: ‘todaysDate’ was not declared in this scope
 std::cin >> todaysDate;
             ^
prog.cpp:202:13: error: ‘lastDate’ was not declared in this scope
 std::cin >> lastDate;
             ^
prog.cpp:204:20: error: lvalue required as left operand of assignment
 monthsLeft * 18.17 = daysLeftEstimate;
                    ^
prog.cpp:205:56: error: ‘numberOfSchoolDaysLeftUntilSummer’ was not declared in this scope
 lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
                                                        ^
prog.cpp:208:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 if (monthsLeft = 7)
                   ^
prog.cpp:211:13: error: ‘todaysDate’ was not declared in this scope
 std::cin >> todaysDate;
             ^
prog.cpp:214:13: error: ‘lastDate’ was not declared in this scope
 std::cin >> lastDate;
             ^
prog.cpp:216:20: error: lvalue required as left operand of assignment
 monthsLeft * 17.71 = daysLeftEstimate;
                    ^
prog.cpp:217:56: error: ‘numberOfSchoolDaysLeftUntilSummer’ was not declared in this scope
 lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
                                                        ^
prog.cpp:220:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 if (monthsLeft = 8)
                   ^
prog.cpp:223:13: error: ‘todaysDate’ was not declared in this scope
 std::cin >> todaysDate;
             ^
prog.cpp:226:13: error: ‘lastDate’ was not declared in this scope
 std::cin >> lastDate;
             ^
prog.cpp:228:20: error: lvalue required as left operand of assignment
 monthsLeft * 18.25 = daysLeftEstimate;
                    ^
prog.cpp:229:56: error: ‘numberOfSchoolDaysLeftUntilSummer’ was not declared in this scope
 lastDate - todaysDate -((lastDate - todaysDate)/7*2) = numberOfSchoolDaysLeftUntilSummer;
                                                        ^
prog.cpp:232:33: error: ‘numberOfSchoolDaysLeftUntilSummer’ was not declared in this scope
 std::cout << "\nThere are: " << numberOfSchoolDaysLeftUntilSummer << "days left until it is summer time. \n Estimation: \t" << daysLeftEstimation;
                                 ^
prog.cpp:232:128: error: ‘daysLeftEstimation’ was not declared in this scope
 std::cout << "\nThere are: " << numberOfSchoolDaysLeftUntilSummer << "days left until it is summer time. \n Estimation: \t" << daysLeftEstimation;
                                                                                                                                ^
stdout
Standard output is empty