-3
   CWmcaIntf::CWmcaIntf() :
       m_hDll(NULL),
    m_pLoad(NULL),  m_pFree(NULL),  m_pSetServer(NULL), m_pSetPort(NULL),   m_pIsConnected(NULL),
    m_pConnect(NULL),   m_pDisconnect(NULL),    m_pTransact(NULL),  m_pQuery(NULL), m_pRequest(NULL),   m_pAttach(NULL),
    m_pDetach(NULL),    m_pDetachWindow(NULL),  m_pDetachAll(NULL), m_pSetOption(NULL),
    m_pSetAccountIndexPwd(NULL),    m_pSetOrderPwd(NULL),   m_pSetHashPwd(NULL),    m_pSetAccountNoPwd(NULL), m_pSetAccountNoByIndex(NULL)

i dont know what this grammer means. i am trying to use a header file 'CWamInf'. and want to know different methods or problems .. thanks..

Badda
  • 1,329
  • 2
  • 15
  • 40
  • See [member initializer list](http://en.cppreference.com/w/cpp/language/initializer_list). – songyuanyao Apr 27 '17 at 02:17
  • This is the default constructor for the `CWmcaIntf` class. It is very simple to use. If you don't know what a constructor is, go back to your [C++ reference book](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list). – Cody Gray - on strike Apr 27 '17 at 09:51

1 Answers1

0

I don't know how much you know about headers classes and stuff so I'll try to explain everything I can.

CWmcaIntf::CWmcaIntf() :

The CWmcaIntf:: means that the function that is about to be defined after the double colon is within the class "CWmcaIntf".
The CWmcaIntf() is a constructor : it has the same name as the class and its purpose is to construct each object of a class depending on the code you put in it. I'd say that often, its only purpose is to initialize member variables. If it isn't clear yet, check this link.

m_hDLL(NULL)

As you most certainly know, programmers tend to respect and harmonize on coding conventions. One of those is to name all member variables by m_something, so your code become easier to understand for you and everyone else.

So here, all you got is a constructor initializing a lot of member variables to NULL, which means that when a CWmcaIntf object will be constructed, its member variables will be equal to nothing and only be modifiable with setters if data are properly encapsulated.

Now if the purpose of your question was for us to tell you more about what does mean the member variables, and what the constructor may do, well don't expect an answer since zero details ae given and nothing even matches the tutorial explaining how to properly ask a question.

Badda
  • 1,329
  • 2
  • 15
  • 40