c++ - how can a NanAsyncWorker parameter be "undeclared identifier" -


i have code (from https://github.com/nodejs/nan/tree/master/examples/async_pi_estimate )

class piworker : public nanasyncworker { public:     piworker( nancallback *callback, nanutf8string sz_qmn )     : nanasyncworker( callback ) {}          ~piworker() {}  void execute() {     printf( "(cc)>>>> qmn [%s].\n", sz_qmn ) ; .... line 52 

... , compiler says

..\mqconn.cc(52): error c2065: 'sz_qmn' : undeclared identifier 

how can ?

did declare sz_qmn private member?
nan example, execute() function access private members.
can initialize sz_qmn private member in constructor:

public: piworker(nancallback *callback, nanutf8string sz_qmn) : nanasyncworker(callback), sz_qmn(sz_qmn) {} 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -