#include <iostream>
#include <string>
class SomeClass
{
private:
std::string* m_stringArray;
public:
SomeClass()
{
m_stringArray = new std::string[2]{"Jan", "Feb"};
}
~SomeClass()
{
delete[] m_stringArray;
}
void Print()
{
for (int i = 0; i < 2; ++i)
{
std::cout << m_stringArray[i] << std::endl;
}
}
};
int main()
{
SomeClass someInstance;
someInstance.Print();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKY2xhc3MgU29tZUNsYXNzCnsKcHJpdmF0ZToKCXN0ZDo6c3RyaW5nKiBtX3N0cmluZ0FycmF5OwoJCnB1YmxpYzoKCVNvbWVDbGFzcygpCgl7CgkJbV9zdHJpbmdBcnJheSA9IG5ldyBzdGQ6OnN0cmluZ1syXXsiSmFuIiwgIkZlYiJ9OwoJfQoJCgl+U29tZUNsYXNzKCkKCXsKCQlkZWxldGVbXSBtX3N0cmluZ0FycmF5OwoJfQoJCgl2b2lkIFByaW50KCkKCXsKCQlmb3IgKGludCBpID0gMDsgaSA8IDI7ICsraSkKCQl7CgkJCXN0ZDo6Y291dCA8PCBtX3N0cmluZ0FycmF5W2ldIDw8IHN0ZDo6ZW5kbDsKCQl9Cgl9Cn07CgppbnQgbWFpbigpIAp7CglTb21lQ2xhc3Mgc29tZUluc3RhbmNlOwoJc29tZUluc3RhbmNlLlByaW50KCk7CglyZXR1cm4gMDsKfQ==