I have problems accessing _maxx, it says: ./ScoreBoard.hpp:20:38: error: member access into incomplete type 'WINDOW' (aka '_win_st') mvwprintw(score_win, 0, score_win->_maxx - 10, "%11llu", score); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/curses.h:322:16: note: forward declaration of '_win_st' typedef struct _win_st WINDOW;
this is my code:
#pragma once
class Scoreboard {
protected:
WINDOW * score_win;
public :
Scoreboard(){
}
Scoreboard(int width, int y, int x){
score_win = newwin(1, width, y, x);
}
void initialize(int initial_score){
this->clear();
mvwprintw(score_win, 0, 0, "Score: ");
updateScore(initial_score);
this->refresh();
}
void updateScore(int score){
mvwprintw(score_win, 0, score_win->_maxx - 10, "%11llu", score);
}
void clear(){
wclear(score_win);
}
void refresh(){
wrefresh(score_win);
}
};