Trying to work with 3 arrays. Taking an original finding the duplicates and counting the dupes and the new elements in the dupe array. Here is the code I have so far. It doesn't work. Asking for suggestions to where I am going wrong.
void frequencyCount(short original,short nonduplicate, short count,short& countNew,short size)
nonduplicate = original;//since I know first element is not yet duplicated I assign it to element 0
count=1; //also nothing in Count yet so 0 element of count will count be 1 until element 0 is duped the should inc.
countNew=1;//new element in dupe array so element count is 1;
for(k=1;k<size;k++)//assign 1 to k because want to start now with that element in original array.
value=original[k];//do I even need the variable value?
count[m++];//if the value is a duplicate inc the value in the element of count array
m++; //otherwise put the nondupe in nondupe array
count[m]=1;//make the count 1 for new num
countNew++;//new element count