Error int ofWindowSettings::width is protected

Hello guys How to fixed this?
I am trying to set the width and height of the ofGLFWindowSettings but I failed.

my code
‘’’
ofGLWindowSettings settings;
settings.width = 700; // <-- error here
settings.height = 500; // <-- error here
‘’’
The error message is
int ofWindowSettings::width is protected within this context

How to fixed this?
I am trying to set the width and height of ofGLWindowSettings

settings.setSize(width, height);
1 Like