in the above code .... what is not a good habit or illegalCode:void set(int newprice=-1,char newname[]={"NONAME"},int newqty=-1) { if(price!=-1) price=newprice; if(strcmp(newname,"NONAME")!=0) strcpy(name,newname); if(qty!=-1) qty=newqty; }
i get a warning like this......
[Warning] extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]