The given code,
class Haab{
    string str[];
    Haab(){
        str[] = {"abc", "abd", "abe"};
    }
};
is invalid in a number of ways:
- string str[];declares a member array of unknown size. Can't do that.
 
- In - str[] = {"abc", "abd", "abe"};, the expression- str[]uses the- []indexing operator without specifying the index.
 
- If that parsed, then the - =would denote assignment of a single string.
 
Here's one C++03 way to do things:
#include <string>
#include <vector>
namespace qwe {
    using std::string;
    using std::vector;
    class Haab
    {
    private:
        vector<string> str_;
    public:
        Haab()
        {
            static char const* const data[] = {"abc", "abd", "abe"};
            for( int i = 0; i < 3; ++i )
            {
                str_.push_back( data[i] );
            }
        }
    };
}  // namespace qwe
There are also other C++03 ways, all of them ugly (as the above).
In C++11 and later it can be done with more elegant & simple notation;
#include <string>
#include <vector>
namespace qwe {
    using std::string;
    using std::vector;
    class Haab
    {
    private:
        vector<string> str_;
    public:
        Haab()
            : str_{ "abc", "abd", "abe"}
        {}
    };
}  // namespace qwe
but this does still not compile with Visual C++ 13.0 (it does compile with MinGW g++ 4.9.1).