int code(){
cout << "Insert the line to be coded: ";
string codeline;
cin >> codeline;
cout << endl;
std::string str (codeline);
int codesize = str.size();
int i = 1;
std::string fullcode;
char get;
string codechange;
while (codesize>=i){
get = codeline[i];
if(get='a'){
codechange=="o";
}
elseif(get='b'){
codechange=="p";
}
elseif(get=' '){
codechange==" ";
}
else{
cout << "ERROR INCORRECT INPUT, PLEASE RUN PROGRAM AGAIN...";
cout << endl;
cout << endl;
}
fullcode.append(codechange);
i++;
}
cout << endl;
cout << "Finished CODE: ";
cout << fullcode;
}
And I was wondering what is wrong with my code. I am getting no errors so I can't tell. When I input "a" so that it should output "o", I get an empty output... What am I doing wrong?!