I don't know why I am getting below error
" warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]"
I have .h and .cpp file
in .h file, I have declare variable name
class file
{
private:
string* arr;
public:
void list();
}
in .cpp file
void file::list()
{
arr = new string[2]{"1", "2"};
}
Aucun commentaire:
Enregistrer un commentaire