Q:

How to init member object in declare time?

Here is a class.
class Checker
{
public:
  Checker();
  ~Checker();

private:
  MapFileParser m_MapParser; //MapFileParser::MapFileParser(const char* path)

};

Is there have any way to init class member object when it is declaring another class? The MapFileParser class have only one constructer which has a signature like MapFileParser::MapFileParser(const char* path). But I can't initialize when it is in class member. So i always initialize the MapFileParser member in Checker class's constructer. 

A:

You can use:

In-class member initialization syntax to initialize a member variable (possible only in C++11 or later).
MapFileParser m_MapParser = MapFileParser("some sensible file name");

Initializer list syntax to initialize a member variable.
Checker::Checker() : m_MapParser("some sensible file name") { ... }

The in-class member initialization syntax is helpful only if you have more than one constructor. If you have one constructor, you can use the initializer list syntax without loss of functionality. 
If you have multiple constructors and you are able to use a C++11 or later compiler, you might be able to use the delegating constructors to reduce code duplication.

In a comment, you said:

I will fix the Checker()'s parameter void to const char * and the Checker(const char * Path) will pass the path to MapFileParser. 

In that case, the only solution will be to use member initialization list to initialize the member.
Checker::Checker(char const* path) : m_MapParser(path) { ... }

