So I'm just trying to write an empty string to a char [80]
and I get the error "cannot convert string to char* in getstr()"? (I get this in general when writing a string to a char
array like char[80] = "hello world"
.)
This includes a lot of ncurses stuff btw. Didn't include other functions.
int main(){
std::string message;
//...
for(;;){
wrefresh(chatWin);
message = "hello world";
getstr(message);
if(message != ""){
displayMessage(message, displayLine, displayWin);
wmove(chatWin, 1, 7);
}
}
}
I expect it to get the input from the user from the function but it throws the error "cannot convert string to char* in getstr()". getstr
is from ncurses. Any help is greatly appreciated and thank you in advance!