C++ error " Lvalue required as left operand of assignment"
#include <iostream> int main() { std::cout<<"you are trying to break into a secret lab."<<std::endl; std::cout<<"you need to enter 3 digits on a security lockpad."<<std::endl; std::cout<<"the only information you have about the 3 digits is that the sum of the three digits is 9"<<std::endl ; std::cout<<"and that their product is 24.please note that you have to enter the digits from the lowest to the highest"<<std::endl; int CodeA=2; int CodeB=3; int CodeC=4; int Code1; int Code2; int Code3; std::cin>> Code1, Code2, Code3; if(Code1=CodeA&&Code2=CodeB&&Code3=CodeC) { std::cout<<"Success,the door opens!"; } else{ std::cout<<"wrong combination,try again!" ;} return 0; }