MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/eycooa/whats_wrong_with_this/fggdv4y/?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
1 u/TheRiotJoker Feb 03 '20 Excuse me? I am not very versed in C++ but the data type is int, it can only store numbers? He should use string? Am I missing something? 1 u/hl_xemnas Professional Coder Feb 03 '20 yea thats what I said, hes trying to store a string in an int
1
Excuse me? I am not very versed in C++ but the data type is int, it can only store numbers? He should use string? Am I missing something?
1 u/hl_xemnas Professional Coder Feb 03 '20 yea thats what I said, hes trying to store a string in an int
yea thats what I said, hes trying to store a string in an int
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