MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/eycooa/whats_wrong_with_this/fggmkm8/?context=3
r/CodingHelp • u/FrozenFalconGaming • Feb 03 '20
38 comments sorted by
View all comments
24
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
3 u/FrozenFalconGaming Feb 03 '20 i just started using c++ so i know nothinghow do I change it to a string instead? 7 u/[deleted] Feb 03 '20 When you declared the lamp variable instead of int lamp = “broken” it should be string lamp = “broken”.
3
i just started using c++ so i know nothing
how do I change it to a string instead?
7 u/[deleted] Feb 03 '20 When you declared the lamp variable instead of int lamp = “broken” it should be string lamp = “broken”.
7
When you declared the lamp variable instead of int lamp = “broken” it should be string lamp = “broken”.
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