I have the following error with Qt. Can anybody help me with these Qt function errors and how to fix it?
error: request for member 'begin' in 'answer', which is of non-class type 'char*'
error: request for member 'end' in 'answer', which is of non-class type 'char*'
error: invalid conversion from 'char' to 'const char*'
error: request for member 'begin' in 'answer', which is of non-class type 'char*'
error: request for member 'end' in 'answer', which is of non-class type 'char*'
error: invalid conversion from 'char' to 'const char*'
QString qStr = plainTextBox -> text();
QByteArray qba = qStr.toAscii();
char *answer = qba.data();
for (std::string::iterator it = answer.begin(); it != answer.end(); ++it){
if (isalpha(*it)){
*it = tolower(*it);
*it = ((a*(*it -'a')+B)/>/>/>/> % 26)+'a';
*it = toupper(*it);
qStr = QString::fromAscii(*it);
encodedTextBox -> setText(qStr);
}
}