Hi,
I am just trying to understand “explicit” keyword in C++ and would appreciate some link to gain better understanding.
Also while looking at some online resource, I came across some “not very familiar” notation at this link:
http://cplusplus.com/forum/articles/17108/
==============================================
// constructor
Array2D(unsigned wd,unsigned ht)
:nWd(wd), nHt(ht), pAr(0)
======================XX========================
Could someone explain: nWd(wd), nHt(ht), pAr(0)?
Also, someone else used the following lines few post down:
==============================================
struct Col {
explicit Col( size_t c ) : col( c ) {}
size_t operator()() const { return col; }
private:
size_t col;
};
======================XX========================
what is with this double parentheses … operator()()…?
Thanks in advance,
DK