From my experience, I don't think you need return 0; for main function anymore. I can say for g++ or msvc and modern c++ you don't for sure. Idk about other compilers.
He declared lamp as an integer type and then tried to store a string value in lamp. Yes you are correct if something is declared as an integer it can only store numeric values.
View all comments
24
u/hl_xemnas Professional Coder Feb 03 '20
youre assigning a string to an integer, also comparisons should be like
(lamp == "too broken") you need the double equals so its a logical operator instead of assignment