When the frequency array in the counting sort function was created, the statement written is " new int[largest+1]{0} ". Can you please the syntax of this statement and shouldn’t we use = between [ ] and {0}.
Creating a frequency array
hello @gautam74
in case of dynamic memory allocation, if we want to initilaise the array element with 0 then the synatx is
int *arrayName= new int[size]{0};
you can use = in between [] and {}
Both the formats are giving an error while compiling the program with a gcc compiler.
…
try compiling it in cb or any other online ide, it will work.
your compiler might not be updated
yeah… could be problem with my compiler since it is working on CB ide.