I'm working on an assignment that asks the use for a single input that represents both month and day ( mm.dd ), this is the code that i have come up with but it is not compiling its giving me 3 errors , on my last if statement and my last two else if statements.
( they go something like this "error: could not convert ‘season.std::basic_string<_CharT, _Traits, _Alloc>::operator=<char, std::char_traits<char>, std::allocator<char> >(((const char*)"Winter"))’ from ‘std::basic_string<char>’ to ‘bool’
if ( season = "Winter"){"
not sure what to do now i'm stuck , would appreciate any help, thank you.
(complete noob i know the format that i have for my code is terrible i'm working on it i promise lol.)
wow thank you so much , its compiled now and working :)
kind of lol i just have one more problem, when im setting the month to be divisible by 3 and the day to be >= 21 the value of the string season isnt changing from "Winter" to "Spring" any idea why? i feel like its because of the way that ive nested my if statements in line 25 and 26, is it okay to put two if statements in a row like that?
awesome I've updated line 26 to if ( (month % 3) == 0 && day >= 21){
and it works perfectly thank you so much for your help, you've saved me a big head ache and have granted me more hours of sleep :D again thanks a lot! You're the best!!!